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 / Update data in excel f...
Power Apps
Unanswered

Update data in excel file on OneDrive

(0) ShareShare
ReportReport
Posted on by 8

Hi everyone, everything fine?

I am creating an application where when clicking on an Approve button, it inserts into Excel the information that that line was approved in a Column called Status.

But when writing the function, it tells me that the Patch function has invalid arguments.

Can you help me?

The function I'm using is the following:

 

Patch(SchedulingTable;
LookUp(TableSchedules; PowerAppsIdSchedule = Gallery3_1.Selected.PowerAppsIdSchedule);
{
'Receipt comments': ReceiptTxt.Text
}
)

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @ErickReris1 ,

    You need to look up the same table you are patching to if you want to identify the correct target record

    Patch(
     SchedulingTable;
     LookUp(
     SchedulingTable; 
     PowerAppsIdSchedule = Gallery3_1.Selected.PowerAppsIdSchedule
     );
     { 
     'Receipt comments': ReceiptTxt.Text
     }
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • ErickReris1 Profile Picture
    8 on at

    Hi WarrenBelz,

    But in this case, isn't that what I'm doing in the formula?

    In both Patch and LookUp I am referencing the same table.

     

    I still got the message that the patch function has invalid arguments

    Patch(
     SchedulingTable;
     LookUp(
     SchedulingTable; 
     PowerAppsIdSchedule = Gallery3_1.Selected.PowerAppsIdSchedule
     );
     { 
     'Receipt comments': ReceiptTxt.Text
     }
    )

     

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    @ErickReris1 ,

    You might have another look at the code you posted

    Patch(

       SchedulingTable;
       LookUp(

          TableSchedules;

          PowerAppsIdSchedule = Gallery3_1.Selected.PowerAppsIdSchedule

       );
       {
    '   Receipt comments': ReceiptTxt.Text
       }
    )

  • ErickReris1 Profile Picture
    8 on at

    Sorry, I think that when I asked the question I ended up confusing the names in the table.

    But the code is right at this point, see the print below:

     

    ErickReris1_0-1714997524873.png

     

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    @ErickReris1 ,

    I cannot see your data, but does PowerAppsIdSchedule exist in the Gallery - if you put a Label with

    ThisItem.PowerAppsIdSchedule

    in the gallery, do you see the field value?

  • ErickReris1 Profile Picture
    8 on at

    I did the test you mentioned and it does appear. Both on the gallery screen and on the page where I have the buttons.

    ErickReris1_1-1715081269560.png

     

    ErickReris1_0-1715081262960.png

     

  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    @ErickReris1 ,

    You are still getting an error on the Table name in your screenshot (so check that). Your structure is correct providing all your references are - I cannot see your data, however Excel is a terrible data source and I would not be surprised if the issue is the size of the string you are trying to match.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard