Jun 11 2022 09:40 AM
Hi,
I'm hoping someone can help.
I'm aware that fields in an SPO Custom List can be displayed/hidden conditionally via the 'Edit Columns > Edit Conditional Formula' route on the New Form.
This seems to fall down though when a user accesses the Edit Form and changes their original answer to the trigger question. The dynamic questions are re-hidden (as per the conditional formula) but the answers previously provided to the dynamic questions (when they were visible) are retained in the list.
I need to find a solution that displays/hides fields conditionally, but that also removes previous responses from the list if the answer to to the trigger question is changed via the Edit Form.
If someone has a solution it would be much appreciated.
Thanks.
Jun 12 2022 09:15 AM
@Matt9915 Unfortunately, this is the default behavior of SharePoint list forms & conditional formulas. Condition formulas can only show/hide fields based on formula, it cannot remove previous responses/values from list columns.
You can use Power apps to customize the SharePoint list forms. Using Power apps, you can show/hide fields as well as remove previous responses/values from list columns based on selections in list form.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Jun 12 2022 11:27 PM
Jun 12 2022 11:51 PM
Solution@Matt9915 You can reset / remove values in one field based on selection of another field (in "OnChange" action) in Power Apps. Refer below threads for more information:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Jun 12 2022 11:53 PM
Jun 13 2022 01:30 AM
@Matt9915 You're welcome! Glad it helped you.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Jun 26 2022 12:53 PM - edited Jun 26 2022 12:54 PM
Hi ganeshsanap,
I'm hoping you're still around! Or maybe someone else can help.
I am still struggling with this issue unfortunately. I can't seem to resolve it by using the onChange property (despite the useful links that ganeshsanap provided).
My scenario is that I have a choice column in my SPO list/Power App that contains just 'yes' and 'no' options. A series of subsequent columns are hidden until the 'yes' option is selected in the choice column. This is working fine.
What I can't seem to figure out is how to reset/clear the value of the subsequent columns if the user re-visits the form and changes their answer to the original choice column from 'yes' to 'no'. This show/hide functionality is re-hiding the columns successfully, but the previous responses are being retained in the SharePoint list.
I have tried applying the following If statement to the 'reset' property of the hidden questions (with DataCardValue17 being the choice question), but this isn't working either. The previous responses still aren't being cleared from the list:
If(DataCardValue17.Selected.Value="No",true,false)
I'm very new to PowerApps so if someone could point me in the right direction I would really appreciate it.
Thanks
Jun 26 2022 10:24 PM
@Matt9915 You can reset the other controls in OnChange property of Yes/No controls as per your requirements.
You have to use the Reset() function for this, like:
Reset(TextInput1)
Documentation: Reset function in Power Apps
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Jun 27 2022 01:00 AM