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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,456)