Hello everyone! I'm building my first, a bit more advanced form for a SharePoint list (not a dev here). This form is meant to serve as a request form, where users can provide request details. There are some fields that are conditionally required. I'm trying to troubleshoot less obvious scenarios and I got stuck at a stage, where user edits existing record. I haven't added any custom buttons and I need to keep it that way, using only the default SP's buttons. I'm going to refer to 2 controls to explain my problem:
- There is a datacard with a control (single select choice) "toggle1" and it is empty by default
- There is a datacard with single line text input "Text1" and it is empty by default, visible only if toggle1 = selection1
Scenario I got covered properly:
- User begins adding new record using "New" button from SP command bar (OnNew event I believe)
- User selects first option on toggle1 (let's call it selection1)
- Text1 becomes visible and user provides input
- User changes toggle1 to selection2, OnChange property of DataCardValue of toggle1 has Reset(Text1) function and clears out the input correctly (double checked that when changing toggle1 back to selection1, there is no text retained)
- User saves record, text1 input is empty
It works well for a new record, but it will not work, if there is existing record with Text1 input provided that's being edited. If I try to edit a record with data in text1, change the toggle1 selection, text1 input is maintained (i.e. if I change back to selection1, input in text1 is sill seen). Secondly, I tried to add notification when toggle1 is changed - OnChange property and Notify function ("Associated inputs were removed"), but the notification behavior is out of my control:
- it is pushed also when the form just opens
- it is pushed also in case when control is blank and then I make a selection (which makes the message invalid, as there were no inputs yet, text1 is hidden)
- is not pushed at all if I remove toggle1 selection by clicking on x mark next to selection label, so the control becomes empty again
I wonder if this can be addressed somehow. Any help would be appreciated, though I need to advertise this to my team as low code, so adding variables wont be helpful, due to the additional layer of complexity it would introduce.

Report
All responses (
Answers (