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 / toggle update Excel file
Power Apps
Answered

toggle update Excel file

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a toggle that I want to connect to my Excel file. When the toggle is on I want to update my excel file with Yes or something. 

I have also problem with that the toggle is connected to all my work items. So when the toggle is on it is on for all work items. Please see the last picture. 

 

Toggle.jpgtoggle oncheck.jpgmeeting booked.jpg

 

 

toggle on workitems:

workitems.jpg

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

    Hi @Anonymous ,

    Could you show me your error message?

    I've made a similar test but not met the same problem like your description.

    Here's my test:

    OnCheck:    Patch(Table1,Defaults(Table1),{'Meeting booked':true})

    OnUncheck:   Patch(Table1,Defaults(Table1),{'Meeting booked':false})

    Both of them worked.924_LI.jpg

     

    9241.PNG

     

    About your secord question, please try to set the toggle's Default: ThisItem.'Meeting booked'.

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-yutliu-msft 

    So my code should be like below?

     

    OnCheck:    Patch(Tickets,Defaults(Table1),{'Meeting booked':true})

    OnUncheck:   Patch(Tickets,Defaults(Table1),{'Meeting booked':false})

     

    What should I write instead in the red marked text?

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    The red part is decided by whether you want to create a new record or edit an existing record.

    If you want to create new record, you need to use this formula:

    Patch(tablename,Defaults(tablename),{....})

    If you want to edit an existing record, you need to use this formula;

    Patch(tablename,the item that you want to edit,{....})   // you could use many formulas to represent the item that you want to edit, for example: LookUp,First(Filter()),gallery.selected.

    And the formula that you use "ThisItem" is ok too.

    Here's a doc about Patch function for your reference:  (I think maybe you do not kown a lot about this function)

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

    So could you tell me your error message?

     

     

    Best regards,

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 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard