Hi All,
I have a flow where I am testing if a user belongs to a SharePoint group and then creates an array of the groups they belong to.
Do do this I am filtering through an Array of all groups as below and then I want to check if the results from this HTTP request are blank (equal to "[]") as shown below.
The outputs of a (_api/web/sitegroups/GetByName('GroupName')/Users?$filter=Email eq 'EmailAddress') when the group doesn't contain this user looks like this.
{
"d": {
"results": []
}
}
However Power Automate see's this "[]" parameter as an array and won't perform the check. How can I create a condition that check if these results are blank?
I've tried using double and single quotes around the square brackets, I've tried "null" as well as leaving the parameter empty but no luck.
Solved! Go to Solution.
Hi @LinkToTheAsh_,
In your condition action you could check for the length of the response. If it is equal to 0 it is empty.
length(outputs('Check_if_Buyer_is_a_Member')?['body/d/results'])
Hi @LinkToTheAsh_,
In your condition action you could check for the length of the response. If it is equal to 0 it is empty.
length(outputs('Check_if_Buyer_is_a_Member')?['body/d/results'])
@Expiscornovus that worked perfectly, so simple I feel like banging my head against the wall now haha. Thank you.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
32 | |
31 | |
24 | |
24 | |
20 |
User | Count |
---|---|
60 | |
57 | |
43 | |
37 | |
28 |