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 / If statement with type...
Power Apps
Answered

If statement with type control and text

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Good evening, 

 

I have a canvas app and I've added a data table with 4 items that pull from a sharepoint list.  Item 2 is a choice of names, which defines as a control in power apps.  I've created a variable; varUserEmail that contains the email of the person accessing the app at that time. Set(varUserEmail, User().Email);

 

I'm trying to make the data table visible only if the varUserEmail matches values in item 2 but it won't work because it's comparing control to text.  Any thoughts?

If('Lead SA'.Selected = varUserEmail, true, false) - this doesn't work.  'Lead SA' is a control and varUserEmail is text

 

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @jw20402 ,

    You need the field name selected in ‘Lead SA’ and also do not need If/true/false

    'Lead SA'.Selected.FieldName = varUserEmail

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard