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
Unanswered

patch

(0) ShareShare
ReportReport
Posted on by 113

hi

i have a a list of task displayed in a gallry, at right of the gallery (tablet shape) i have the view form to see the detail of the selected task

i have in sharepoint a column "yes/no" in which i store the value yes if the task is completed. I tried to use, in this view form, a toggle to change that value in sharepoint, i used the formula oncheck and on uncheck

 

uncheck

Patch(Calendar;ThisItem;{Completed:false})

 

check

Patch(Calendario;ThisItem;{Completed:true})

 

the odd thing is that when i press on an item in the gallery, automatically the value of "competed" go on "true"

why this behaviour?

Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @diego_marino ,

    How do you want the Toggle to behaviour?

     

    Please consider set the OnChange property of the Toggle control to following (rather than use Oncheck and OnUncheck property of Toggle control):

    If(
     Toggle1.Value = true;
     Patch(Calendar; Gallery1.Selected; {Completed: true}); /* <-- Gallery1 represents the Gallery control in your app */
    Patch(Calendar; Gallery1.Selected; {Completed: false}) )

    set the Default property of the Toggle control to following:

    If(
     Gallery1.Selected.Complated = true,
     true,
     false
    )

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • diego_marino Profile Picture
    113 on at

    yes sir it works may i ask why this default formula? i used "thisitem.completed" that's a sharepoint yes/no column and it worked...

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard