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

Notifications

Announcements

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

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:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard