Manipulate visibility of a text box via arbitrary data
I have a problem that started as a simple test in manipulating visibility of a Text box that sits in a particular Data view. Here is what I basically want: Change the visibility of a text box (which is part of a Data view form) by a simple push of a button. Here is what I know: A Microflow (which fetches an Object for that form) provides my DataView with only one Object (of a particular type). If I want to manipulate Text box visibility in that DataView, I can (and must?) use the Visibility „based on expression“ and via that „expression“ somehow access the flag that says is that text box currently visible or not. Aforementioned button would in turn manipulate that flag rendering text box visible or not. But here is the problem: I cannot access any data from outside DataView but only the microflow provided Object (and some System stuff but that is of no use). And that Object is persistable entity from my business case and is not ment to hold any transient/session flags. I suppose I could in theory connect that Object to a different (Non persisted) Object (that is ment to hold my visibility flag) in the model itself. Then „based on expression“ would use the dreaded XPath to access it. However, the thought of this convoluted solution is a bit chilling and breaks the purpose of a model on all theoretical and practical levels: visibility of an atribute has nothing to do with data Model, it is in this case a simple feature of a View. There must be a simple and elegant solution to this problem. Is there? Thank you.
If you add a 'ShowAnswer' boolean (default false) to the expression entity, it can be used to show the asnwer with visibility based on an attribute expression (true).
Create a microflow for the push button with input parameter Expression in which the 'ShowAnswer' boolean is changed from false to true. Don't forget to refresh the expression object in the microflow.
Thomas de Lyon
This is the model
And this is a part of a page with form in question