cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
remariu
Frequent Visitor

Checkbox Default not recognizing item value

I have a checkbox in which I want the default value to be pulled from a SharePoint List item.  I have a Gallery set up and upon selection of the item, I set the following variable: Set(varRecord, ThisItem).  I have several fields (not in a form) that I want to populate with the SharePoint column values associated with this record.  One of the columns is populated with "Yes"/"No", and I want a checkbox to either show as true (checked) if the Item value is "Yes" and the opposite for "No."

 

I have the Default property set as follows:

 

If(varRecord."column_name" = "Yes", true, false)

 

But this is not working.  It seems to be "remembering" the last values from a previous selection and ignoring this expression.  I have confirmed that varRecord."column_name" is pulling the correct value, but the checkbox is not displaying it.

 

Any help would be greatly appreciated!

 

Thanks!

Renee

1 ACCEPTED SOLUTION

Accepted Solutions
JR-BejeweledOne
Super User
Super User

Try this:   If there are no spaces in your column name it shouldn't need "" around it.

 

Switch(
   varRecord.column_name,

      "Yes",
         true,

      "No",
         false
)

  



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

3 REPLIES 3
JR-BejeweledOne
Super User
Super User

What type of column is the Yes/No column in the SharePoint list?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

It’s a text field. 

JR-BejeweledOne
Super User
Super User

Try this:   If there are no spaces in your column name it shouldn't need "" around it.

 

Switch(
   varRecord.column_name,

      "Yes",
         true,

      "No",
         false
)

  



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,686)