
Announcements
Hi,
I currently can submit a form and post submission all data fields fill up to a previous submission. But I would like the data fields to stay populated with what the last submission is of the submitter, so that they can export to pdf (which is a separate flow) and so that they wouldn't have to go back into the gallery to find their submission. Form is currently in edit mode.
Submit button code is only: SubmitForm(Form2)
Also, how do I get rid of a random submission populating the fields after the last submission. Within the screenshot, "Terry Whin" is not the latest submission. Not sure why it's being populated. I didn't choice Terry within gallery. Thank you!
Hi @Anonymous :
Do you want to get the last submit record?
Do you want to make the form show the last submit record?
Is the form’s item depend on the selection of the gallery?
I assume the above assumption holds.
Firstly, I have two solutions to get the last submit record.
1\Call the form’s LaseSubmit property.
LastSubmit – The last successfully submitted record, including any server generated fields.
2\Use the standard field "Modified" (SharePoint) Or "Modified On" (CDS)
These fields hold the last modification time of the record. Just use the following code to call your recently modified data.
First(Sort(yourdatasource, "Modified On",Descending))
Secondly, here is my solution to make the form show the last submit record.
The key is to set Gallery's default options and reset Gallery.
The gallery(Gallery1)
Default:
First(Sort(yourdatasource, "Modified On",Descending)) /* When the gallery is reset, it will select the latest modified record by default*/The submit button:
OnSelect:
SubmitForm(Form2) ;Reset(Gallery1) /* Reset this gallery, it will select the latest modified record by default*/The Form:
Item:
Gallery1.Selected
Best Regards,
Bof