“I have a list of users and a registration list, how can I check if everyone is registered with Power Automate, to check there’re no values missing in the array?”
Searching for differences between two lists is quite an annoying task to do, especially for bigger lists. You can compare the lists visually, if you have enough time. You can use Excel to put the values into columns and compare them using a formula, if Excel is your tool of choice. Or you can build a simple Power Automate flow to list the differences, which is the topic of this post.
Create the two arrays for comparison
To find the missing values you need two inputs – the array with all the values, and the second array with some of them. For example a list with all users and a registration list.
The first step is therefore to get all the data into Power Automate flow. ‘Get items’ from the first list and ‘Select’ the values to compare, in this case the email addresses.
Repeat the same steps for the second list, with the registrations.
The outputs of the ‘Select’ actions will be the two arrays to compare.
List the missing values
Since Power Automate doesn’t have an expression to find the differences, you’ll have to do a small workaround.
Instead of an expression use the ‘Filter array’ action. Use the bigger array as the From value, the smaller array on the left side and the item() expression on the right side.
The result will be an array with the values from the first array missing in the second array.
There’s currently no expression in Power Automate to compare two arrays and find the missing values in the smaller array, but there’s again a workaround. Get both the arrays into your flow and let the ‘Filter array’ do the work. The result will be only the values that are missing, in this example the email addresses of users who didn’t register.
1 thought on “List values missing in an array using Power Automate”