cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cxc2
Level: Powered On

Connector Search User - User not found - Applying logic for User not found

Hello 

Am trying to apply logic for a case whereby a user may not be found when using the connector Search User. The body returns [] for when a user is not found.

 

image.png

 

 

 

Nonetheless I have tried to apply the following logic and still no luck, such as 

equals(length(body('Search_for_users')), 0)

equals(length(body('Search_for_users')), 0)

 

 

To stop the process from looping, I have put in a condition if Display Name is not equal to "Input field" then send me a notification.

image.png

 

 

The flow does not ever get to this point but seems to execute the "no" condition 

 

 

 

 

image.png

image.png

 

Basically, if user is not found I want the next step to be send me a notification. Has anyone been able to apply logic when user not found ? At this stage body contains [ ] 

 

Any guidance on this would be much appreciated.

 

Thanks

2 REPLIES 2
Super User
Super User

Re: Connector Search User - User not found - Applying logic for User not found

Hi @cxc2 

 

Use condition action in Flow

 

length(body('Search_for_users')) is equal to 0
length(body('Search_for_users')) - expression
 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

cxc2
Level: Powered On

Re: Connector Search User - User not found - Applying logic for User not found

Hello Reza

 

Thanks for your feedback. I have tried to apply the logic but still does not work. Irrespective if a valid user name has been entered, the flow seems to loop through a list of names. I had to cancel the flow as I was worried that it was looping and sending off incorrect emails to users.

 

image.png

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 317 members 3,030 guests
Please welcome our newest community members: