cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BenD
Level: Powered On

Make objects visible on button click

Hi All,

 

I am attempting to make a label visible upon clicking a button. However, I only need this to be visible if one or more out of my 3 textboxes are blank. I have attempted multiple different methods including writing code OnSelect of the button as well as the Visible property of each of the labels. Here is an example of the most recent code I have attempted to implement:

 

If(IsBlank(RegInput.Text) || IsBlank(OwnerInput.Text) || IsBlank(ContactInput.Text), NotCompleted_Button.Visible=true && NotCompleted_Info.Visible=true && NotCompleted_Title.Visible=true, NotCompleted_Button.Visible=false && NotCompleted_Info.Visible=false && NotCompleted_Title.Visible=false)

 

I was also tried implementing variables and setting three different variables equal to true OnChange like so:

 

Set(ContactComplete, true)

Then checking each of these variables on the button click:

 

If(!OwnerCompleted || !ContactComplete || !RegCompleted, NotCompleted_Button.Visible= true && NotCompleted_Info.Visible=true && NotCompleted_Title.Visible=true,NotCompleted_Button.Visible=false && NotCompleted_Info.Visible=false && NotCompleted_Title.Visible=false)

This still doesn't make anything visible when clicking the button. I have also attempted multiple google searches and can't really find any related to this specific problem.

 

Coming from other languages such as Java and scripting languages, it's a very different format and layout so I am still getting to grips with Powerapps and the solution to this may be fairly simple. 

 

Any help is greatly appreciated.

 

Thanks, Ben

2 REPLIES 2
Administrator
Administrator

Re: Make objects visible on button click

Bumping for visibility 

 

@TopShelf-MSFT 

lucia
Level 8

Re: Make objects visible on button click

Hey,

 

You can try setting variable on visible field of your label to be displayed and use again Set() to change it to true or false with your if statement. I do not think assigning Label.Visible = true is working.

 

Hope this helps.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 239 members 4,937 guests
Please welcome our newest community members: