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!
Solved! Go to Solution.
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.
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.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
184 | |
53 | |
41 | |
36 | |
30 |
User | Count |
---|---|
240 | |
74 | |
71 | |
69 | |
65 |