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 Platform Community / Forums / Power Apps / Submit to sharepoint b...
Power Apps
Answered

Submit to sharepoint button formula problem

(0) ShareShare
ReportReport
Posted on by 76

I have a button that is suppose to submit to a PowerAutomate workflow. It is sending values to a PowerAppsV2 workflow. One of the values is an optional text field. This is also submitting an attachment to a sharepoint document library and updating some meta data. When I changed it from required to optional, the run formula changed from 'Upload'.Run(Text, Text_1, Text_2, {file:Record}) to this 'Upload'.Run(Text, Text_2, {text:Text, File:Record}. I can't figure out how to enter this information correctly. Here it was originally 'Upload'.run(Title.Text, ISNum.Text, Comments.Text, contentBytes: First(Attachment.Attachments).Value, Name: First(Attachment.Attachments).Name})

 

I have tried this as the new value, but it isn't accepting this as a formula.

'Upload'.run(Title.Text, Comments.Text {ISNum.Text, contentBytes: First(Attachment.Attachments).Value, Name: First(Attachment.Attachments).Name}})

Any idea on how to fix this? and why this keeps happening when I make a text field optional?

Thanks!

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

    Hi @iwannabfishn ,

     

    Could you please show me your flow?

     

    Best Regards,

    Bof

  • Verified answer
    iwannabfishn Profile Picture
    76 on at

    So, I did find the answer to this question. It was consistent. When a text field is made optional, the run formula puts it in the curly brackets like this. This is the formula that is working.

    'Upload'.run(Title.Text, Comments.Text, {text:ISNum.Text, contentBytes: First(Attachment.Attachments).Value, Name: First(Attachment.Attachments).Name})

    If I change the ISNum field to be mandatory the formula will move it outside the curly brackets. Weird but this is what works.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard