web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

How to sync toggle

(0) ShareShare
ReportReport
Posted on by 105

Hello community!
Any ideas how to synchronize toggle in a canvas app with SharePoint choice column (true/false)? 

So when it's true in SharePoint list toggle is on, when it's false in SP list it's off.~
Column might be specific. 

ab32add2-a895-4eeb-9cc7-3826c2f3055a.png

Any ideas?

If(LookUp(ListName,Title="UCC" && ForceClosed.Value="true"), Set(locToggleValue, false),Set(locToggleValue, true))


I tried this one but my first part of the formula doesn't work, Invalid argument type  (record) expecting Boolean. I guess I'm missing synaxis somewhere true/false.
locToggleValue is on select for my toggle212.PNG
Any ideas?

Categories:
I have the same question (0)
  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hey @KK76875875 

     

    This should help, you can refer to the column directly for boolean yes/no when doing lookups like this:

     

    If(
     //if set to true on the list for that lookup
     LookUp(ListName,Title="UCC").ForceClosed,
     //then set to true via variable
     Set(locToggleValue, true),
     //otherwise its false on the list and should be false here
     Set(locToggleValue, false)
    )

     

    Cheers,

    Sancho

  • KK76875875 Profile Picture
    105 on at

    Greetings Sancho @iAm_ManCat  
    Thanks for your reply!

    It still gives me the same error 😞

    Capture2323.PNG
    I think the problem is in ForceClosed column, do we need to specify true/false choice somehow?
    2312e.PNG

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Ah, you have a choice column, not a boolean yes/no column!

     

    So your Default property of the toggle will be:

    LookUp(ListName,Title="UCC").ForceClosed="true"

     

    Then your OnSelect, you should be patching the list directly, although I see you have a popup there - does the popup change the value on the list?

  • KK76875875 Profile Picture
    105 on at

    It's slightly different:
    If(
    //if set to true on the list for that lookup
    LookUp(ListName,Title="UCC").ForceClosed.Value="true",
    //then set to true via variable
    Set(locToggleValue, false),
    //otherwise its false on the list and should be false here
    Set(locToggleValue, true)
    );

     

    You still need a .Value
    I need to learn PowerFX 🙂
    Thanks for your help Sancho , I appreciate that!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard