cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Super User
Super User

Image click disable IF CONDITION

Experts,

 

I have an image on a page with onselect set to nextpage navigation.

If the following conditions are satisfied, just the image B should be clickable; else, the image B should be grayed out.

 

Condition . 

Page A is the name of the first page . Label 13 may be found on page A.

The current state is. If the wording on Label3 is 100%, then only picture B on page 2 should be engaged for any actions. Image B should be grayed out if label3 is not equal to 100%.

The following formula is used in picture B, however it is ineffective.

If('page A' = Label13.Text(100%) )

Please share your ideas.

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@AVTS 

Yes, you will get an error on that because the syntax is not correct.  I provided you with the correct formula:

  If(Label13.Text = "100%", Edit, Disabled)

Copy and paste the formula into your DisplayMode.  I am not sure why you modified it.  Controls are global to the app, the page reference you have in not needed. And text must be surrounded by quotes.  Plus, your logic you mentioned indicated that if the label shows 100% then the image should be actionable.  Yours is backward.

Copy and paste the above formula.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Himanshu_90677
Super User
Super User

If(Label13.Text = "100%", Display Mode.Edit, Display Mode.Disabled)

View solution in original post

7 REPLIES 7
RandyHayes
Super User
Super User

@AVTS 

Look to the DisplayMode property of the Image.

Set it to:

   If(Label13.Text = "100%", Edit, Disabled)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

thank. But i am getting error,

 

If('page A',Label13.Text=100%,DisplayMode.Disabled)

 

Is there any issue in this. 

 

 

RandyHayes
Super User
Super User

@AVTS 

Yes, you will get an error on that because the syntax is not correct.  I provided you with the correct formula:

  If(Label13.Text = "100%", Edit, Disabled)

Copy and paste the formula into your DisplayMode.  I am not sure why you modified it.  Controls are global to the app, the page reference you have in not needed. And text must be surrounded by quotes.  Plus, your logic you mentioned indicated that if the label shows 100% then the image should be actionable.  Yours is backward.

Copy and paste the above formula.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thank you, @RandyHayes 
It appears that I am overlooking the following points.

 


I've got two pages.
Page A and Page B are two pages.

 


Page A has the Percentage( percent ) information, whereas Page B contains the images.

 


So, based on the Page A percent changes, the Page B picture should react as previously stated.
As a result, I attempt to include the Page A data in the Page B picture Displaymode.

 

Himanshu_90677
Super User
Super User

If(Label13.Text = "100%", Display Mode.Edit, Display Mode.Disabled)

Thank you @RandyHayes . I missed your valid point. Yes you spot on. Many thanks indeed. 

Thank you @Himanshu_90677 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,425)