Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Button visible only to a specific user


Hello everyone!

I have an SP List of products and one of the columns is for the seller who sold that merchandise.
In the app, I have a screen with the Form of this list, with several DataCardValue with the information of the products, including the name of the seller, this screen can be accessed by several people.
However, now I want a button that is only visible to the seller of that product and the manager.
At first I tried this in Visible: "If (Lower (DataCardValue_seller_name.Text) = Lower (User (). FullName); true, false)"
Where "DataCardValue_seller_name" is the card of the form that contains the name of the seller responsible for the sale.
This function only recognizes False, can someone help me?
Super User
Super User

Your formula give an impression that the loged in users name is the same as the sellers name. is that the case?


if that is not the case and you have the username as one of the columns, do the following OnStart;


Set(LoggedSeller, LookUp (Datasource, usernameColumn=User().FullName, SellerColumn)


Then in the Visible of the Button;


If (Lower (DataCardValue_seller_name.Text) = Lower (LoggedSeller); true, false)


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.

Thanks for the answer.
Unfortunately it didn't work. I just want to confirm that the name on the DataCard is the same as the name of the user who is logging in to the App, and if it is the same, the button will be visible.
I tried your suggestion but it doesn't work.
Why doesn't my code work? "If (Lower (DataCardValue_seller_name.Text) = Lower (User (). FullName); true, false)"
Any suggestion?

I have seen ; in your code instead of ,

So change the code to ;

Lower( Trim(DataCardValue_seller_name.Text)) = Lower (Trim(User ().FullName))



Lower (DataCardValue_seller_name.Text) = Lower (User ().FullName)


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.

I Tried
"if (Lower (DataCardValue_seller_name.Text) = Lower (User () .FullName), true, false)"
But he accuses invalid argument within the Lower. The only way to make sure there is no error is to insert the SearchText in "Lower (DataCardValue_seller_name.SearchText)", in this there is no more error but the comparison of the words is not correct, it is always calculates False even when they are the same words.

Helpful resources

2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,982)