cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Post Partisan
Post Partisan

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
Advocate V
Advocate V

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
Advocate V
Advocate V

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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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