0

I have this array which contain a list of MediumID integers:-

enter image description here

And then i am getting some items from sharepoint, then i want to filter the sharepoint items with only the the one that have their MediumID inside the list of integers:-

enter image description here

I tried to use intersection length(intersection(outputs('Select-MediaIDs'), createArray(item()?['MediumID']))), but i got invalid query.. any advice?

I also tried to use "is equal to",, to compare Int to array of integers(hoping it will work),, but it did not:-

enter image description here

6
  • 1
    Create a comma separated string with the ID’s and the use a contains over the SharePoint list. There are better ways but you’d need to use a third party connector. The advanced data operations connector does it using the join operation in one step. Commented Nov 12 at 11:40
  • @Skin can you provide an example please? Commented Nov 12 at 11:58
  • Update your question with the two sets of sample data and if I find the time I will. Commented Nov 12 at 19:03
  • See the contains function Commented Nov 13 at 9:49
  • @SamNseir contain work with string not with array of strings Commented Nov 13 at 16:18

1 Answer 1

0

See the contains function:

Specifically, this function works on these collection types:

  • A string to find a substring
  • An array to find a value
  • A dictionary to find a key

So for example, in your Filter Array action, you could have:

// left
contains( outputs('Select-MediaIDs'), item()?['MediumID'] )

// middle
is equal to

// right
true() // add as expression, not string
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.