web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Condition to verify va...
Power Automate
Unanswered

Condition to verify valid email address in MS Form does not work

(0) ShareShare
ReportReport
Posted on by

I have users submit a form that triggers a flow to create an item in a SharePoint List. The form includes a question to add the Managers email address. A condition checks if the email address is valid by searching for an active account. If Yes I want it to create the item and email the Manager to confirm it has been added. If the email is incorrect or does not refer to an active account, it should take the No route and send an email to the Form Responders' email to notify them an invalid email was entered. The flow looks like this:

andybdiver_0-1597334239509.png

 

I first tried this with just the first row of the condition set to Account Enabled is equal to true. When the form is submitted with the email of a valid account the value in the output of Search for users is set to true and the flow takes the Yes route and creates the item in SharePoint. However, if there is no valid account the output value is set to [0] and should, in theory, take the No route. Run history still shows the flow run as successful but the condition is "greyed" out and no email is sent to notify the  form responder that the email entered is incorrect.
Flow.jpg
I added an extra row to take the Yes route if the output value did not equal [0] and got the same result. I also tried it with just the value is not equal to [0], and another attempt with the expression empty(body('Search_for_users')) equals false. Everything I have tried gives me the same result: a valid email takes the Yes route and invalid greys out the condition but run history says the flow ran successfully.

 

I would really appreciate some help with this. Thanks!

Categories:
I have the same question (0)
  • JohnAageAnderse Profile Picture
    1,986 on at

    Hello @andybdiver 

    Did you find a solution or is your issue still relevant?

    There are three conditions that your flow needs to take into account when checking the email.

    1) The email address is not found

    2) The email address is found and active

    3) The email address is found and not active

    4) The email address search returns more than one result

     

    The 1) result you have to test for before you enters the Apply to each action.

    The 4) result you have to test for before you enters the Apply to each action.

    The 2) and 3) you have to test for inside the Apply to each action, when the 4) result is only one!

    Anyway, tell us where you are with this 🙂

    Kind regards, John

  • Random1232 Profile Picture
    32 on at

    Been 2 years since question is asked but writing it down for anyone who comes here for answer:

     

    In condition, instead checking Value is not equal '[0]', check for length(Value) is greater than 0

    Random1232_0-1670450841839.png

     

    expression is: 

    length(outputs('Search_for_users_(V2)')?['body/value'])
     

    Hope it helps!

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard