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 / Button is enabled or d...
Power Apps
Answered

Button is enabled or disabled based on User().email.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello all. I have an application with mulitple screens; Main, New registration, and Edit existing registration. On main screen is list of all previous registrations with a button per record that enable the user to go to Edit existing registration with that particular information repeated for editing. On Main screen I want to have all registrations shown. I however only want button to show on those particular registrations assigned to the current logged in user. Since a user may have multiple registrations, the button should only show up for those registrations and no others. I do not want a different user who is logged in to get to someone else's edit screen to make changes. I assume I have to assigned the button a visible attribute at start of app but do not know the proper formula to do this.

 

Button Onselect is currently set to: ClearCollect(currentReg,Gallery4.Selected);Navigate(UpdateRegistrationForm,ScreenTransition.Cover)

 

I currently have data connectors to Office 365 users and use a SP list for saving new registrations and updates to existing registrations. I have variables set for User(). Full Name, .email, .ID.

 

Any ideas would be greatly appreciated.....

Categories:
I have the same question (0)
  • Verified answer
    eka24 Profile Picture
    20,925 on at

    I suggest you Rather filter your Gallery to show record for the logged in user. If the Gallery is connected to the EditForm, the only his or her records could be edited.

     

    Your current items on the gallery is not shown but you can try something like:

    Filter (Datasource,Emailcolumn=User().Email)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks eka24. Know it makes sense to limit registration list to only logged on user in Main screen but business reason not to do so. However, if I was going to apply the Filter command to show only logged on user registrations, where would the formula belong on the Main Screen attributes? Fairly new at this so really appreciate your assistance.

  • eka24 Profile Picture
    20,925 on at

    Put it on the Gallery items property.

     

    However if you insist on your original request, then give a screenshot of the of the button and the screen for me to proceed

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    eka24,

    I have attached the main screen and edit registration screens for you review. The main screen capture shows the edit registration button with formula that sends user to the edit screen. I also included the patch formula in the edit screen.

     

    If there is a possibility to use the Filter command, something happens in the translation of the email variable. When I try to insert the column heading which I assume is the column title for emails in the SP list, it appends '_1' to the end of it. I can not grab the original variable (column heading) without the appended section. Is this typical? If so, why is the appended section added to the variable name?

     

    Again thanks....

    Edit registration screen 1.0v 052120.jpg
    Mainscreen Registration 1.0v 052120.png
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi eka24,

    I retired your formula with my local variables and it worked. Awesome! Even though that is not completely what I was looking for, it have provided an excellent alternative to consider. Thanks much for getting me this far.....

  • eka24 Profile Picture
    20,925 on at

    If it has achieve your purpose mark as a solution

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard