cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SotaSil
Regular Visitor

Passing parameters in SubmitForm() to callback

Is it possible to pass parameters in SubmitForm to callback "OnSuccess"?

The case is to create multiple items in SharePoint list with attachements. So I use "ForAll" function. And I need to patch "Submitted" items in callback "OnSuccess" with unique parameters.

 

Example of my code:

Note: ItemsCollection - is a repeatable set of inputs.


ForAll(ItemsCollection,
SubmitForm([@Attachements]);
)

 

And this code in "OnSuccess":

Patch('ListName',Attachements.LastSubmit, {
Field1:collectionInput1.Text,
Field2:collectionInput2.Text
});

 

So in this case it patches all submitted items with params of the last item of collection.

1 REPLY 1
v-monli-msft
Community Support
Community Support

Hi @SotaSil ,

 

Did you mean that you want to create multiple repeated items with only attachments different for them?

SubmitForm function only works with form control's name. You need to include all the required fields in the data source.

Not only the attachments data card inside it. 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,506)