Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Patch has some invalid arguments

(0) ShareShare
ReportReport
Posted on by 158

Hello! 

 

Every time I am using Patch function I need help and this time I have no idea what is wrong here...

 

Patch(
'Request Training',
Defaults('Request Training'),
{
'Name': Value(DataCardValue2.Text),
'Request ID': Value(DataCardValue3.Text),
Trainee: Value(DataCardValue5.Text),
'Start date': DateValue1.SelectedDate,
Position: DataCardValue6.Selected.Value,
Shift: DataCardValue7.Selected.Value
}
)

 

The data source is table in dataverse with column titles as shown in my patch function. I have checked all titles and DataCardValues numbers and it's all ok. Shift and Position are choices, Date is DateValue to choose, Request ID is a number which in table is WHOLE NUMBER, in my form it has a function to increment by 1:  First(Sort('Request Trainings', 'Request ID', Descending)).'Request ID' + 1. 

 

Help, please!

Categories:
  • cha_cha Profile Picture
    cha_cha 4,904 on at
    Re: Patch has some invalid arguments

    Please mark your answer as the solution to officially close this ticket.

  • cha_cha Profile Picture
    cha_cha 4,904 on at
    Re: Patch has some invalid arguments

    Glad that you figure it out. 😊

  • MP-13011217-0 Profile Picture
    MP-13011217-0 158 on at
    Re: Patch has some invalid arguments

    Thank You, I've found error it was on one of my choices... thanks! 🙂

  • Verified answer
    cha_cha Profile Picture
    cha_cha 4,904 on at
    Re: Patch has some invalid arguments

    Hello @marcy_pi 

     

    With this limited info, it's difficult to point out the issue.

    Since we can't get any further info, adding one by one your record values and see at which point it prompts for a new type of error.

     

    Before starting, update your Dataverse table to make sure that all columns (except Name) are not required. Refresh in Power Apps the data source then start doing this:

     

    Start with Name only first.

    cha_cha_0-1671626125132.png

    then next is Required ID and so on until you know which column is causing the issue.

     

     

  • MP-13011217-0 Profile Picture
    MP-13011217-0 158 on at
    Re: Patch has some invalid arguments

    I've tried it but it's still showing the same error. 

  • cha_cha Profile Picture
    cha_cha 4,904 on at
    Re: Patch has some invalid arguments

    Hello @marcy_pi 

     

    That's tough. For now, I'm suspecting this might be the source of the issue.

    cha_cha_0-1671625597483.png

     

    Can you please share a screenshot of what is highlighted to be wrong in your Patch code?

     

  • MP-13011217-0 Profile Picture
    MP-13011217-0 158 on at
    Re: Patch has some invalid arguments

    That's all it says:

     

    marcy_pi_0-1671625478304.png

     

  • cha_cha Profile Picture
    cha_cha 4,904 on at
    Re: Patch has some invalid arguments

    Hello @marcy_pi 

     

    Can you please get the full error message?

    cha_cha_0-1671624709828.png

     

    Click each item in the error and share with us the complete message similar below:

    cha_cha_1-1671624759779.png

     

    The error message will help us decipher that cause of your issue.

     

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard