I have a flow using the Search For Users (v2), where if an employee is not found, update a sharepoint list item to "N", otherwise "Y". When an employee is not found, its not updating with a "N" but its blank. See attached pictures.
Your Condition is inside another For each loop. That loop only runs when Search for users returns users. So when no employee is found, the returned value array is empty, the loop never starts, and your SharePoint item never gets updated to N.
Try this:
In the Conition use
empty(body('Search_for_users_(V2)')?['value'])
is equal to
true
True branch update to N, False branch update to Y.
And remove the other Apply to each.
Let me know if it worked and mark a verified if it worked!
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.