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
Answered

invalid argument

(0) ShareShare
ReportReport
Posted on by 141

this is my code. 
Set(varPDF,PDF(Container1));UploadPDFtoSP.Run("test.pdf",Substitute(JSON (varPDF,JSONFormat.IncludeBinaryData),"""","")))

I got this error: invalid number of arguments:  received 2, expected 1.

I don't know what went wrong.

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @norashura ,

     

    Could you please show me your flow?

    In addition, please check the trigger input arguments:

    vbofengmsft_0-1693891403532.png

    vbofengmsft_1-1693891414476.png

    I think this link will help you a lot:

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/how-to/pdf-function#create-a-flow-to-use-in-your-app

     

     

    Best Regards,

    Bof

     

     

     

  • Inogic Profile Picture
    1,297 Moderator on at

    Hi @norashura 

    You can also check with below steps to reset the parameters:

    1. In your power automate flow delete the step of "PowerApps". It will remove all the parameters of "Ask In PowerApps" in Power Automate Flow

    Please refer the below screenshot:

    Inogic_0-1693891692400.png

     

    2.Again add the "Ask In PowerApps" parameter in the Power Automate where you want to pass value from the canvas app.

    Thanks!

     

    Inogic Professional Services Division

    Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

    Drop an email at crm@inogic.com

    Services:  http://www.inogic.com/services/

    Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

  • Verified answer
    norashura Profile Picture
    141 on at

    i've already resolve the issue. this is my flow .

    norashura_1-1693897199423.png

    this is my code :
    savefiletopdf.Run({file:{name:"",contentBytes: PDF(Container1 ,{ExpandContainers:true})}})

     



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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard