My form has multiple screens (tabs). When a form is submitted it is assigned to someone. When the form is assigned and the assignee updates the form, it updates the values in the SharePoint list as well. The edit form has fields which show or hide based on values in a dropdown. I noticed that if an assignee fills out a field and submits, then for some reason reopens the form because the selection they made was incorrect, if they delete the current info. in the text field and choose another value from the dropdown and other respective text fields show and they fill those out, and return to the previous dropdown value, the text they deleted still shows, although I have setup an OnChange "Reset" formula for that field. Can anyone advise how to rectify this. I am also seeing this behavior with other fields on the edit form. Thanks.
You don't need the OnChange Reset bit...
Go to your Advanced Settings in your app and turn on Formula-Level Error Management.
I hope this is helpful for you.
Can you provide a screenshot or more with some visual on what is happening?
Sure @RandyHayes - In the First Aid Screen shot, when a user selects First Aid from the Incident type-Sub Category field, the "please provide additional details" field is displayed. Note: There are several options under Sub Category which link to this same "Please provide additional details field", however, as mentioned before, I included an OnChange reset function which should reset this field if the sub category changes. A saved form was reopened and the sample text in the screenshot "This is a First Aid incident" was deleted and another value selected from the dropdown which shows different fields like "Please include approximate value." When I update those fields which are shown, and go back to the "First Aid" in the dropdown, the deleted text still remains, so its saving that text back to SharePoint again, although I did not want it to.
Okay...putting the pieces together a bit more...
So how are you saving the data in the form? I assume a SubmitForm ??
Very good, then let's get some formulas:
- What is the Item property of the Form?
- What is the OnSelect formula where you SubmitForm?
- What other formulas have you put in this form to perhaps change visibility or any thing else?
@RandyHayes - the info requested:
Item property: LookUp('Initial Incident Notification',ID=EditFormID) -where Initial Incident Notification is the SharePoint list
OnSelect formula: SubmitForm([@EditForm1])And Navigate(UpdateIIN_ThankYouScreen,ScreenTransition.Fade)
Other formulas are: Specific fields show/hide based on selection from the dropdown. eg: currentTab="UpdateIncident" And (If(IsBlank(IncidentType_SubCategory.Selected.'Sub Category'),ThisItem.'Incident type - Sub Category'.Value,IncidentType_SubCategory.Selected.'Sub Category') in ["Equipment Failure","Process upset","Safety Critical Equipment and Systems","Indoor air quality","First Aid","Communicable disease","Ergonomic","Heat Illness","Lost Time Injury - Hospital Stay > 5 days","Lost Time Injury - Hospital Stay 1-5 days","Vehicular","Medical Treatment","Personal Non-Occupational","Personal Occupational","Procedural deviation","Process Incident","Tier 1","Tier 2","Breach in Procedure","Restricted Work Case","Vehicular (Non-Preventable)","Vehicular (Preventable)","Personal Safety","Non-Occupational Personal Safety Incidents (Near misses or accidents)","Fatality","Cyber attacks","Threat","Unauthorised Intrusion","Tier 3","Tier 4","Activated","Failure In Service","Failure on Demand","Failure on Demand (testing)"])
Whereby if the sub category dropdown is any of the values above, then show the "Please provide additional details field."
Also, on the Sub Category OnChange property there is: Reset(CMMS_SAPWorkOrder);Reset(ProvideAdditionalDetails);Reset(DescribeProperty_MaterialDamaged);Reset(IncludeApproxValue);Reset(IncludeChemicalDesc);Reset(SizeOfSpill);
To clear the original values from the field if the user changes their mind and chooses another sub category.
That's it for the most part.