cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Change Label in Gallery based on checkbox value on following screen

I have the below if statement set in the Default property of a label within a gallery.

If(roastBatchLoadingBatchRoastedCheckBox.Value = false, "Not Started","Complete")

However they all start off with Complete, even though the defualt toggle is off.

 

Also I can only have one item say "Not Started"  and it seems the statement applies to the most recent check and not the individual item in the gallery.  Any ideas on how to apply this 'conditional formatting to every item in the gallery.  

 

I also tried 

If(roastBatchLoadingBatchRoastedCheckBox.Value = false && ThisItem.Batch_Number = roastBatchLoadingBatchNumber.Text, "Not Started","Complete")

But I get the same result.  Only one item in the gallery list can say "Not Started"

 

Any help is greatly appreciated.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Change Label in Gallery based on checkbox value on following screen

Hello again @shailendra74 ,

 

 Just wanted to follow up with my solution.

 

So I wasn't reading the actual data from the back-end.  I realized that the canvas isn't acutally storing the data 

(the true/false of the checkbox) and thats when it dawned on me that I need to read the data stored in the backend.  Also I was using the Fill Property not the TemplateFill property.

 

My solution for the templateFill property was:

I had a label that looked up the value of the completed column for that batch then I changed the visible property to false.  

If(Lower(greenBatchSelectionBatchStatus.Text) = "true", RGBA(209,232,178,1), RGBA(220,153,153,1))

It is now working just as expected.  

 

Thank you for the quick response.

 

 

 

View solution in original post

3 REPLIES 3
Highlighted
shailendra74
Level 10

Re: Change Label in Gallery based on checkbox value on following screen

Hi @Anonymous 

 

Where is the checkbox placed within gallery or outside gallery?

 

If checkbox is within gallery as part of a record, you can set the Label value as

 

If(ThisItem.FIELDNAME = value, "Not Started", "Complete")  // FIELDNAME is the field check box maps to and the value based on the field.

 

Thanks.

Anonymous
Not applicable

Re: Change Label in Gallery based on checkbox value on following screen

Hello @shailendra74 , 

 

  The checkbox is not within a gallery.  It is on the following screen, on a blank canvas app.  

 

However I think I solved my problem.  I need to read the value from the back-end and set the fill that way, otherwise it is not reading any real data, just a checkbox.  I will try that out and see how that works and follow up.

 

I appreciate the response.

 

Anonymous
Not applicable

Re: Change Label in Gallery based on checkbox value on following screen

Hello again @shailendra74 ,

 

 Just wanted to follow up with my solution.

 

So I wasn't reading the actual data from the back-end.  I realized that the canvas isn't acutally storing the data 

(the true/false of the checkbox) and thats when it dawned on me that I need to read the data stored in the backend.  Also I was using the Fill Property not the TemplateFill property.

 

My solution for the templateFill property was:

I had a label that looked up the value of the completed column for that batch then I changed the visible property to false.  

If(Lower(greenBatchSelectionBatchStatus.Text) = "true", RGBA(209,232,178,1), RGBA(220,153,153,1))

It is now working just as expected.  

 

Thank you for the quick response.

 

 

 

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,633)