I have a SharePoint List that I'm trying to take all comma-delimited string data from a field and put into a collection so I can try to find if I have any duplicates based on a certain combination.
SharePoint List:
| Type | Status |
| Type 1,Type2,Type3 | New |
| Type2,Type3 | Final |
| Type 4 | Final |
I'd like to load all Types that have a Status of "Final" into a collection. Then in the app when a status is changed on a record to "Final" I want to pull all Types that have a Status of "Final" into the same collection. Then I need to check for duplicates in the collection to prevent saving back to SharePoint if there are any duplicate Types for the status of Final. For example if I change the first record above to Final the app should have duplicate Type2 and Type3 values in the collection and I shouldn't be able to save until the Type or Status column is changed so the Types are no longer duplicated for the Status of Final.
I tried a ForAll loop with a Split and that just splits the string into a table but I have 2 records in the collection with a table as the column. I'm not sure how I could split the string into 1 collection with rows for each value instead of putting them into tables within the collection. What I'm expecting to see on Start of the app is a collection with the following:
| colFinalTypes |
| Type2 |
| Type3 |
| Type4 |