Hello everyone
I would like to compare two SharePoint lists, if the ID is missing in one table, this should be added with additional information.
I tried it with a loop but it doesn't work.
Best regards
HI @grantjenkins ,
Your solution is helpful for me also. but need one more help.. How to update for the Person or group,
items('Apply_to_each')?['Requestor/DisplayName']
This above one is not working. Can you please help.
Thanks,
Maha
Thank you. YEEEAAAH... . It works. I am happy, this milestone was still missing. THANK YOU VERY MUCH!
Ah OK - looks like the German translation for Body in this case is Text. I should have asked my son to translate as he's been learning German for a while now 🙂
The Filter array won't give you individual properties as it doesn't have its own schema.
You can reference each property you want to use with the following expression:
items('Apply_to_each')?['NAME_OF_YOUR_PROPERTY']
//Example:
items('Apply_to_each')?['Category']
Note that you might need to use your German translation for 'Apply_to_each'.
Thank you for the Answer.
I have not a Body.
Can it be due to too many entries or columns?
Best regards
I can see in your Apply to each you're passing in something with the name Text? It should be the Body of the Filter array.
When you run the flow can you have a look at the output of the Filter array to see if it's returned your filtered results? I'd do this before adding the Create item just to check/confirm the filtering is working as expected.
Hello,
Thank you very much.
The solution was perfect. Until the elements are created.
I don't see the areas of filtering?
I have in the right selection box no elements from the array filtering.
As a result, he does not filter them out of me.
Thanks for the help.
Best regards.
See example where it will return items from List A (Issues Register List) that don't exist in List B (Issues). I'm comparing List A internal ID field with List B Issue Id field. I'm not sure what you have but should give you what you need in terms of logic.
List A (contains the full list of items)
List B (only contains some of the items)
Below is the full flow. I'll go into each of the actions.
The first thing it does is get all the items from both lists.
Select Issues IDs get a list of all the Issue Ids into an array using the following expression. Note that it also converts the values to int.
int(item()?['IssueId'])
In my case this will result in the following array.
We then use Filter array to check if the items from Select Issues IDs do not contain the ID from List A. This will result in the Filter array only containing items from List A that are NOT in List B (based on the ids).
value comes from Get items Issues Register
Output comes from Select Issues IDs
ID is item()?['ID']
We can then use an Apply to each to iterate over the items in the Filter array and add what we want to List B. In my case I'm just adding the Title and ID from the items in the Filter array.
The final result of List B (Issues) would be:
Your problem might be that the logic of 1<>null doesn't evaluate to true. Try converting the ID from list2 into an if(empty(IDcolumn),0,idcolumn)
*my formula might not work as written but should give you an idea of what to try.