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

Cannot Patch

(0) ShareShare
ReportReport
Posted on by

Hello All,

 

I am new to PowerApps and have a project which relies on outputting data to various excel sheets. I have never used patch before.

 

In OnSelect, for an icon I am attempting to:

  1. Submit EdiForm1 to create a new line in my sharepoint list,
  2. Patch data to start a new row in an excel sheet which is named 'VendorToWaferID' which I have added as a dataconnection.
  3. Navigate back to a browse screen.

The code I am using is pasted in below.

 

SubmitForm(EditForm1);
Patch(
VendorToWaferID,
Defaults(VendorToWaferID),
{
Batch ID: DataCardValue18.text,
Wafer ID: DataCardValue10.text,
Vendor Box ID: DataCardValue19.text,
Vendor Box Slot: DataCardValue20.int,
Vendor Ingot No: DataCardValue21.int,
Date of batch up: now(),
Operator: DataCardValue2.SelectedText.Value
}
);
Navigate(BrowseScreen1)

 

The errors I get are quite random so I think my code is at fault. Please could someone take a look at the OnSelect input and tell me if there is anything wrong. I have removed the patch code and the other 2 commands work correctly, so the error is in the patch.

 

Thank you all in advance.

 

Categories:
I have the same question (0)
  • Rajkumar_M Profile Picture
    3,743 Moderator on at

    Hi

    Try this

    Patch( VendorToWaferID, Defaults(VendorToWaferID),

    { 'Batch ID': DataCardValue18.Text,

    'Wafer ID': DataCardValue10.Text,

    'Vendor Box ID': DataCardValue19.Text,

    'Vendor Box Slot': DataCardValue20.Value,

    'Vendor Ingot No': DataCardValue21.Value,

    'Date of batch up': Now(),

    'Operator': DataCardValue2.SelectedText.Value } )

    Or

    SubmitForm(EditForm1);
    Patch(
    VendorToWaferID,
    Defaults(VendorToWaferID),
    {
    'Batch ID': DataCardValue18.Text,
    'Wafer ID': DataCardValue10.Text,
    'Vendor Box ID': DataCardValue19.Text,
    'Vendor Box Slot': Value(DataCardValue20.Text),
    'Vendor Ingot No': Value(DataCardValue21.Text),
    'Date of batch up': Now(),
    Operator: DataCardValue2.SelectedText.Value
    }
    );
    Navigate(BrowseScreen1)


    Thanks!

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard