Hi Mark, I've tried 2 different filter arrays. see attached image. The first filter array does not return any results. The second one returns identical results. Its not filtering out the CIR number that does not match.
Thank you for this, Mark! I feel like I'm getting closer.
I have done as instructed, but still having issues, because it's creating duplicate records in the sharepoint list. would you mind showing me how you setup your filter array? And how you setup the sharepoint create new item for the CIR records are not in the sharepoint list?
Converting the CIR property to an integer with int() won't work because we're doing a contains operation that only works on strings / arrays.
I've also experienced the same "not(notcontains(" typo when saving and reopening the app in the "new designer". I'd recommend editing the flow in the old desiger, flip the toggle or put "v3=false" in your url parameters section.
Your goal I think is to instead convert your array of numbers (from your Select GetItems Parse JSON) action into strings.
You could do this by modifying the expression you're using in your "Select GetItems Parse JSON" action. ​​​​​​​
Whatever expression you have there (I'm guessing it's something like "item()?['Submitted CIR[CIR ID]']") needs to be wrapped in a string() function.
Here below I did an test using data like yours and got it to work.
I have an "Array A" which are the numbers in a string format (inside quotes) and an "Array B" with the CIR numbers as integers.
When I select the CIR numbers out of Arrray B, I wrap the expression in a "String()" function to make sure they come out as strings like Array A and not numbers. string(item()?['Submitted CIR[CIR ID]']) Here it works.
Regarding the @not(notcontains. the Filter array keeps adding this, even after I manually remove it. Tried it both in new designer and legacy designer and in basic and advanced mode. However when i look at the code of the results of the test I see that it is ok:
A few things. There's definitely a syntax error/typo with your Filter Query. It should read "@not(contains(" but you have "@not(notcontains(".
Additionally, I'm not sure if you have the correct reference to your Parse JSON in your filter. I'd have to see what your Parse JSON and its output looks like, but it doesn't look quite right. You need to be inputing an array into your filter.
Finally, if you are trying to compare a number in string format with a number in value/number format, you need to transform one of them.
It looks like your SharePoint values are numbers in string format, so you could potentially fix your filter by doing something like the following to convert your sharepoint value into an integer. @not(contains(@{body('Select_GetItems_Parse_JSON')},@{int(item()?['CIR'])}))
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.