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 / Issue with using user ...
Power Automate
Unanswered

Issue with using user field as business rule

(0) ShareShare
ReportReport
Posted on by 185

Hi everyone,

 

I'm building a simple approval flow, the user choose his supervisor and the flow send approval email to the supervisor. I'm using a CDS entity for it and set the supervisor field as "Lookup" type with User.

We don't have manager filed filled by our HR, so the "Get Manager" won't work, that's why the user need to manually choose supervisor in the first place.

 

Many users don't actually know who to choose, so there's a supervisor list, and I want to make sure the chosen supervisor is on that list, so I make a business rule based on the supervisor field, if the chosen supervisor is not on the list then show an error message.

 

The issue is I tried using name, email address as condition but no success, so what should I type in the value box of the rule to let it work?

 

微信截图_20210311101915.png微信截图_20210311101830.png

Categories:
I have the same question (0)
  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @Derek4 

    I suggest to use a filtered view with the list of supervisors as your lookup view , So create a new View called Supervisor List and add your criteria to it, then on your form on the lookup field choose the view you have created

    Mira_Ghaly_0-1615457511868.png

     

  • Derek4 Profile Picture
    185 on at

    Hi @Mira_Ghaly ,

     

    thanks for the reply, the reason I use user lookup field is I can directly retrieve the email address of that chosen user so that the flow knows who to send the approval.

     

    if I create my own lookup view then the flow wouldn't know who to send approval, so I need an extra "switch" step to tell the flow about it. I have 15 approvers on the list so it would be 15 cases for the "switch"... ...

     

    so is there a workaround for it?

  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @Derek4 

    I think i misunderstood you but can you please explain again what is the issue with the business rule on your lookup?

     

  • Derek4 Profile Picture
    185 on at

    @Mira_Ghaly 

     

    Basically I want to show an error message if the chosen supervisor is not on my supervisor list by setting up an Business Rule.

     

    The way I set up the rule is to check if the supervisor field contains a specific value (like names or email address), if it contains the name of a supervisor on my list then do nothing, if no then show error message.

     

    the supervisor field is a lookup field of all users.

     

    I have tried set that value as name, email address but it doesn't work.

  • Verified answer
    Mira Ghaly Profile Picture
    11,413 Moderator on at

    @Derek4 

    Please try the below:

    You need to Add X rules with AND Condition for your X allowed supervisors

    Mira_Ghaly_0-1615586892978.png

     

     

  • Derek4 Profile Picture
    185 on at

    @Mira_Ghaly 

     

    Thank you, it works.

    It turned out that I was using the "OR" Condition instead of the "AND"...

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard