I have a best practice question: Currently working code for visibility is based on a SharePoint Choice Field for approximately 60 different fields. These fields are all columns in an SPL and typically have a beginning, end, and result column. All of these are governed by a Ctrl + C, Ctrl +V, of code like this
If(DataCardValue24.Selected.Value = "abc"
|| DataCardValue24.Selected.Value = "123"
,true,false)
There can be quite a few options in the list. Having to update this in 4-5 places (Edit and Detail Screens) takes a bit of effort, would something like this work or be more efficient?
If(DataCardValue24.Selected.Value = "abc"
|| DataCardValue24.Selected.Value = "123"
,
UpdateContext({ShowSection: true}), UpdateContext({ShowSection: false})
My main concern would be that the form is able to update as quickly as it currently does on change without the Context variable. I believe this would cut down on having to add 2 additional lines of code if I wanted to add "xzy" to the Choice Field. Thank you!