cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nick11
Frequent Visitor

Multiple submission for forms.

I have a form with 10 different inputs that submits to a share point list. I want this form, once submitted to reset, automatically repopulating the first five fields with the previously submitted data. I tried using last submit and resetting the data, but after the data is reset the fields would delete and the form would be blank again. Is there any way to do this?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Nick11 ,

 

 

As you know, if you reset the form the last submitted will be lost, so the workaround is to save the last submitted values into a variable in Form.OnSuccess property.

Set Form.OnSuccess property: Set(LastItem,Form1.LastSubmit)

Set Default property of each TextInput: LastItem.ColumnName (E.g. LastItem.Title)

Hope this helps

Sik

View solution in original post

6 REPLIES 6
Ajithnair621
Helper II
Helper II

If this is for Canvas Apps, try replacing your fields with Collection fields. Collect the data in Collection and later submit it to SharePoint list. After submitting it clear the fields values in the collection for the record you just created with 'Update', refresh the collection and continue displaying the Collections (this happens by Default if the collection is the datasource on the form).

 

 

@eka24 Sorry, if my reply was incomplete. One solution that I have tried out to perform the Submit Action (when I have collection) is to have a Flow. 

 

For a Complete list of Steps that needs to performed I suggest @Nick11  to go through the following video - https://www.youtube.com/watch?v=HLdOO4JPZ2I. I have used a same concept for one of my issues.

On performing the Submit Action, collection data can be sent in JSON format to the flow. After that have the Flow process the JSON data and update the SharePoint list.

 

Would be happy to help in case of any further queries. 

 

eka24
Super User
Super User

Can you give further information. A screenshot will help because FormName.LastSubmit on the Onsuccess of the form should work.

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Nick11
Frequent Visitor

It is a new form and it does not show up again If I just put lastsubmit in the on sucess field. The only way I have been able to get it to show up again is to use resetform. I also only want the first 5 fields to be automatically repopulated I want the last 5 to remain blank. Attached below is the layout of the default mode new form and how I attempted to automatically repopulate the Title data card after it was reset.

Nick11
Frequent Visitor

 
v-siky-msft
Community Support
Community Support

Hi @Nick11 ,

 

 

As you know, if you reset the form the last submitted will be lost, so the workaround is to save the last submitted values into a variable in Form.OnSuccess property.

Set Form.OnSuccess property: Set(LastItem,Form1.LastSubmit)

Set Default property of each TextInput: LastItem.ColumnName (E.g. LastItem.Title)

Hope this helps

Sik

Ajithnair621
Helper II
Helper II

Please try what @v-siky-msft has provided you with. This is one way of solving it without making any major changes to your App.

 

You can consider my suggestion as an alternative solution.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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