Forum Discussion
Show/Hide Fields Conditionally in SharePoint Online Custom List
- Jun 13, 2022
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.
I have been able to find a lot of guidance on the internet around showing/hiding fields using Power Apps, but haven't been able to find anything on removing previous responses/values from list columns based on selections in another column.
Are you able to give me any guidance on how to do this? Or point me in the direction of a forum thread or blog that covers it?
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.
- Matt9915Jun 13, 2022Copper ContributorThat's really helpful. Thanks ganeshsanap
- ganeshsanapJun 13, 2022MVP
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.
- Matt9915Jun 26, 2022Copper Contributor
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