Hello,
I have declared a variable on screen visible using Set(currentRecord, Defaults('datasource')), datasource is a sharepoint list.
I have a timercontrol on the same screen with onTimerEnd set to Set(currentRecord,Patch('datsource',currentRecord,EditForm1_MemberSubmission1.Updates,EditForm1_MemberSubmission2.Updates)). The two editforms are on two different screens. After submitting the data to sharepoint list, the text in the fields is cleared which I am trying to avoid so that user can continue to see the submitted text.
Thanks,
Solved! Go to Solution.
Hi @ck25415,
Could you please share a screenshot of your app's configuration?
Further, could you please show more details about the Timer control within your app?
I have made a test on my side (using a Button control instead of a Timer control), and don't have the issue that you mentioned. The GIF screenshot as below:
Please check if you have reset the Edit forms within your app using ResetForm function after you submitted the data.
In addition, please take a try to add a Button control within your app instead of the Timer control to submit the form data, then set the OnSelect property of the Button control to following formula:
Set(currentRecord,Patch('datsource',currentRecord,EditForm1_MemberSubmission1.Updates,EditForm1_MemberSubmission2.Updates))
then check if the issue is solved.
Please also check if the Item property of the Edit forms set to the currentRecord variable, if yes, please remove the currentRecord variable from the Item property of the Edit forms (Remain empty within the Item property of the Edit form control).
Best regards,
Kris
Hello Nick,
I am using the editform(defualt set to new) which loads with the screen(not creating a new item from the screen). I checked the onsuccess and reset properties which was set to false. I did not quite understand the tempcollection you explained, could you please explain it more.
Thanks much,
@xample@ck2541
If I understand now,
You have the form with datacard OODB, and you havent created a your own with controls. Reading your history, you were using patch for unique fields which led me off track.
Regarding your choice of default form mode of NEW, is this on purpose?
If so, I can deduce the following:
The form item property is usually paired to a gallery as gallery.selected, if you select an item in the gallery to edit and submit the form, it will still show gallery.selected and the fields will be populated.
However, if you have the mode set to NEW form, gallery.selected is ommitted because its not in the gallery yet, and therefore the form will be empty on submit.
My next thoughts are, your default form mode of NEW.
Other thoughts are, do you just want to see the last submit? Or use the last submit in the populated fields on the next submit?
To get around this you might want to try, creating a temp collection.
Try to collect the last(Source) into a collection with the aim of only 1 record.
A few methods:
Example: Title: First(Tempcollection).Title
This will ensure you will always see the last submit, and if it fails, you will have a draft.
When you go to edit, ClearCollect(tempcollection,thisitem) or similar. If new, you can also decide defaults etc.
If im off track let me know.
I prefer to use minimal variables in all my solutions. My default option is to use collections where possible be cause you can easily modify collections as apposed to variables.
Hi @ck25415,
Could you please share a screenshot of your app's configuration?
Further, could you please show more details about the Timer control within your app?
I have made a test on my side (using a Button control instead of a Timer control), and don't have the issue that you mentioned. The GIF screenshot as below:
Please check if you have reset the Edit forms within your app using ResetForm function after you submitted the data.
In addition, please take a try to add a Button control within your app instead of the Timer control to submit the form data, then set the OnSelect property of the Button control to following formula:
Set(currentRecord,Patch('datsource',currentRecord,EditForm1_MemberSubmission1.Updates,EditForm1_MemberSubmission2.Updates))
then check if the issue is solved.
Please also check if the Item property of the Edit forms set to the currentRecord variable, if yes, please remove the currentRecord variable from the Item property of the Edit forms (Remain empty within the Item property of the Edit form control).
Best regards,
Kris
User | Count |
---|---|
161 | |
86 | |
68 | |
63 | |
61 |
User | Count |
---|---|
212 | |
146 | |
92 | |
81 | |
68 |