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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Comparing a Dropdown T...
Power Apps
Answered

Comparing a Dropdown Text value against SharePoint List for the Signed in User

(0) ShareShare
ReportReport
Posted on by 559

Hi:

I have six Roles in the Dropdown and would like to compare Selected Role Value with Roles in the SP list called Reviewers

Reviewers List - Columns: (ID (Number), Title (Single Line of Text), Reviewer (People Picker), Role (Single Line of Text).

Dropdown - Items code is:  Distinct(Reviewers,Role)  (The Dropdown Items Values are: Bureau Direc., Deputy Sec., Legal Rep., Budget Rep., Policy Direc., Legis. Direc.)

Logged in person (Reviewer) can have more than one Role in the Reviewers SP List.

Issue:

When a Reviewer John Doe logs-in and selects a Role from a Dropdown and if it matches with the Reviewers List then the Button "Go to Home Page" shows. If not, then the Error Message ("Please Use Correct Role")Text Box shows.

I have Visible Property for Error Message Text Box has the following Code:

If(Dropdown1.Selected.Value=(LookUp(Reviewers,varUser.Email=Reviewer.Email,Role)), false , true )

And, the Visible property for "Go to Home Screen" Button has the opposite code:

If(Dropdown1.Selected.Value=(LookUp(Reviewers,varUser.Email=Reviewer.Email,Role)), true , false )

 

First time when John Doe logs-in as "Bureau Direc." and finishes his Review. That works. However, second time when he tries to log-in as a Budget Rep. The system compares his credential and the Budget Rep. value with "Bureau Direc." role (First record under his credentials in the Reviewers list) and the error message shows!

 

So, how can I compare John Doe's Email as well as Role with the entire SP List and if matches with ANY one of the record then it should allow him to sign-in with the matching Role.

 

Can you please suggest a way to achieve this?

Thank you for your consideration.

SueA.

b_Screenshot 2023-03-21 181258.jpg
c_Screenshot 2023-03-21 181258.jpg
Categories:
I have the same question (0)
  • Verified answer
    SueA Profile Picture
    559 on at

    I was able to solve the issue:

    Sharing so it can be a good reference to whoever needs it.

    I created a Gallery and for Items I posted the query below. That gave me the exact row and the pertinent ID I needed for future actions.

     

    With(
    {
    wList: Filter(
    Reviewers,
    Reviewer.Email=User().Email

    )
    },
    SortByColumns(
    Search(
    wList,
    drpRoleSelectCS.Selected.Value,
    "Role"
    ),
    "ID",
    SortOrder.Descending
    )
    )

    Where, drpRoleSelectCS is my Dropdown name.

    The real credit however goes to @WarrenBelz  and @BCBuizer they taught me about Filter, Search and LookUp Functions during my earlier Request Posts. I based my query on those answers.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard