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

Condition for button to be visible

Hello everyone!


In my App I have a screen that shows all the columns of a product sold, all information about it, including who was its seller. Now I want to create a button visible on that same screen only if the user's name is the same as the seller, otherwise the button will not appear. I already tried in Visíble the code: "If (DataCardValue_seller.SearchText = User.FullName, true, false)" where this DataCardVallu_seller contains the name of the product seller.

This code does not work and the button is still visible to any user. can anybody help me?

Dual Super User II
Dual Super User II

Hi @santpaiva 


Can you please try to update your expression to:


If(DataCardValue_seller.Selected.ColumnName= User.FullName, true, false)


Here, you need to replace ColumnName with the name of column that is returned from the dropdown. You can place your cursor after . and intellisense will show you a list of all properties.



Hope this Helps!


If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Super User II
Super User II


Trim(Lower(DataCardValue_seller.SearchText ))= Trim(Lower(User().FullName))

The If() is unnecessary since the formula resolves to either true or false. Trim and Lower account for extra spaces and case variations. BTW, The User() function requires the parentheses.

Super User III
Super User III

What control is DataCardValue_seller.SearchText, a combobox or Textbox?

If a combobox or dropdown what is the code on the items property.


If a Combobox:

DataCardValue_seller.SearchText = User().FullName


If it a textbox then try:

DataCardValue_seller.Text = 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.

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,042)