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 Platform Community / Forums / Power Apps / changing a yes/no swit...
Power Apps
Answered

changing a yes/no switch back to yes consistenly

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey there,

 

i have a list where each item has a yes/no field. im trying to change the yes/no value to yes when i press a button. 

 

i did this using this code: 

Patch(werkplekken, LookUp(werkplekken, BUREAU = bureau_Details.Text), { BESCHIKBAAR: 1 } );

 

this works, sorta.. for some reason if i do this on 2 records sometimes it sets both on available, sometimes it sets 1 to available but keeps the other unavailable and sometimes it doesnt change either. 

 

is there a different way to do this consistently? 

please let me know if u need more info, thanks in advance 🙂  

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,927 Most Valuable Professional on at

    Hi  @Anonymous ,

    Try

    UpdateIf(
     werkplekken, 
     BUREAU = bureau_Details.Text, 
     {BESCHIKBAAR: true}
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey @WarrenBelz,

    Sorry for the late reply.

    I tried this and unfortunately it didn't work 😕 

     

    Hope to hear from you, thanks!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Some more info in case you need it,

    the field info im trying to change: 

    WesselO_0-1597928134109.png

    I also tried using 1 instead of true and this unfortunately also didn't work

    i also checked if the variable actually has info in it and it does,

    WesselO_0-1597928337315.png

     

     

    for more context, i have a app with which you can "claim" a workspot at the office, im working on the ability to delete ur reservation by clicking on a button in the details page

  • WarrenBelz Profile Picture
    155,927 Most Valuable Professional on at

    @Anonymous ,

    I cannot see your data, but that is a very simple update formula and should work if the filter 

    BUREAU = bureau_Details.Text,

    is valid and

    BESCHIKBAAR:

    is a Yes/No field. Can you check this please.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hey @WarrenBelz

     

    I found out last night my problem is a lot more complicated so I will have to make a new ticket for that, but i did your suggestions and after rechecking the field as yes/no the last formula u send worked, so thank you. i will mark it as the solution.

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 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard