Hello Super Community!
I gave up on this concept a week ago, then saw a video where the guy did this in 4 minutes https://youtu.be/SFlj1ykpvgM?si=aBUO60wiYcHu44Qz 😕 I tried it with my own data and two hours later...nope!
Initialized Variable: name: First Array, Type: Array
Thank you so much!!!!
Filter array filters the output of the flow above for items that are in the first array.
Select 3 collects all their List IDs
Map: @item()['Item']['List ID']
0_0 wow this is such an eloquent solution without using 3 Apply to each's. This work wayyyy better. Can I ask you a favor? How do you get the List ID value by itself. I was able to get the "11" with a lot of effort, but perhaps you know a better way?
item()?['Item/List_ID'] doesn't work. And neither did, item()?['Item']['List_ID']
In any case, thank you so much!
That's no problem:
Select
From: @{outputs('Compose_2')}
CompareItem: @JSON(concat('{"Date array": "', item()['Date array'], '"}'))
Item: @item()
Select 2
From: @{body('Select')}
Map: @addProperty(item(), 'isInFirstArray', contains(outputs('Compose'), item()['CompareItem']))
All items in the resulting array have a property "Item" that contains the original item.
So, here's the rub. I have to leave the data as-is in the second array. These two arrays are outputs from the original flow, which is much more difficult. After 4 days, I gave up because this was the part that wasn't working. Every single error imaginable came up. There wasn't just one error.
I'll need the "List ID" ( number 11) later on in the flow to update a column in SharePoint.
If you need true/false per item, replace Compose 3 with the following Select:
From: @{body('Select')}
Map: @addProperty(item(), 'isInFirstArray', contains(outputs('Compose'), item()))
Challenge accepted, 2 minutes 😀
Compose contains your First array
Compose 2 contains your Second array
Select
From: @{outputs('Compose_2')}
Date array: @{outputs('Compose_2')}
Compose 3
@{equals(intersection(outputs('Compose'), body('Select')), body('Select'))}