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

Hello again @Anonymous ,

 

 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
Anonymous
Not applicable

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

Hello @Anonymous , 

 

  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

Hello again @Anonymous ,

 

 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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (65,507)