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 / 'Invalid number of arg...
Power Apps
Answered

'Invalid number of arguments: received 3, expected 1.' - error while trying to submit form to dataverse table.

(0) ShareShare
ReportReport
Posted on by 158

Hello,

 

I have a form which I would like to be filled in to update table in my dataverse (as a new record) by clicking icon SAVE. The column names in table are exactly the same as in my form. 

 

Here is my line written on SAVE icon on OnSelect: 

SubmitForm('Parts', Defaults(Parts), {Name:DataCardValue17, 'Created On':DataCardValue18, Line:DataCardValue20, 'Created By':DataCardValue21, Item:DataCardValue19})

 

Parts is name of my dataverse table.

What am I doing wrong here, please?

 

Categories:
I have the same question (0)
  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @marcy_pi 

     

    You are using a SubmitForm function so it's expecting only one parameter.

    SubmitForm(Name_of_your_form);

     

    Also, if you actually intend to use Patch, it should be in this format since Created On and Created By are automatically filled by Dataverse.

    Patch('Parts', Defaults(Parts), 
    {
    Name:DataCardValue17, 
    Line:DataCardValue20, 
    Item:DataCardValue19
    });

     I'm still not sure if the above Patch code will work though as you are directly calling the property and not the value of the property. A screenshot of your form would probably help me give you better / effective way of writing the code.

  • MP-13011217-0 Profile Picture
    158 on at

    Thank You for a quick response! I've used second option which You suggested - Patch, and now is showing me an error while I'm trying to save it saying:

     

    'Network error while using Patch function: The requested operation is invalid.'

  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @marcy_pi 

     

    It's showing like that because your patch values are blank. As requested in the previous response, please show a screenshot of your form so I can suggest additional codes. The current code now is calling a control and not a value.

  • MP-13011217-0 Profile Picture
    158 on at

    marcy_pi_0-1669127235757.png

     

  • cha_cha Profile Picture
    4,932 Moderator on at

    Try this code:

     

    Patch('Parts', Defaults(Parts), 
    {
    Name:DataCardValue17.Text, 
    Line:DataCardValue20.Selected, 
    Item:DataCardValue19.Text
    });
  • MP-13011217-0 Profile Picture
    158 on at

    Now it's showing these two:

     

    marcy_pi_0-1669127793091.png

    marcy_pi_1-1669127807974.png

     

  • Verified answer
    cha_cha Profile Picture
    4,932 Moderator on at

    It's a bit tricky because Dataverse has different naming values.

     

    Last one from me:

    Patch('Parts', Defaults(Parts), 
    {
    Name:DataCardValue17.Text, 
    Line:DataCardValue20.Selected.Value, 
    Item:DataCardValue19.Text
    });
  • MP-13011217-0 Profile Picture
    158 on at

    It works!!!!!!!!!!!!!!!!! Thank You so much! 😄

  • cha_cha Profile Picture
    4,932 Moderator on at

    lol, glad it works. I was gonna give up.

  • MP-13011217-0 Profile Picture
    158 on at

    Do You know how my line should look like, what format it should be if my data is decimal number? I've tried "DataCard10.Value" and "DataCard10.Text" but it's not working... 

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
Kalathiya Profile Picture

Kalathiya 421

#2
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard