cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
remariu
Helper I
Helper I

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,375)