cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rmanthey
Level 8

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
rmanthey
Level 8

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
shailendra74
Level 10

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

Hi @rmanthey 

 

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.

rmanthey
Level 8

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.

 

rmanthey
Level 8

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
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 (Last 30 Days)
Users online (5,345)