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.
Solved! Go to Solution.
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
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.
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.
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.
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
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.
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 | |
50 | |
37 | |
36 |
User | Count |
---|---|
274 | |
91 | |
84 | |
76 | |
75 |