Hello All,
I'm trying to debug some issues I'm having. I have a few Text Input controls that I have set to View mode through a variable in the OnSelect property of a gallery. I also have (3) buttons (add,edit,save) that I would like to manipulate the display modes of the Text Inputs as well. What I'm trying to accomplish is upon viewing the screen or viewing a record, I need the input controls to be set to viewmode. When I select the "Add" button, I'd like the Text Inputs to change to DisplayMode.edit, same with the "Edit" button, though with the "Save" button, I'd like the inputs to revert back to DisplayMode.view. Currently, when I select a record in the gallery, the inputs change to view mode, but that's as far as I have got. Here is the breakdown of where I'm at....
OnSelect property of my gallery: Set(varInspection,ThisItem); Set(varModeView,DisplayMode.View)
DisplayMode property of Text Inputs: If(varModeView = DisplayMode.View,DisplayMode.View,DisplayMode.Edit)
Default property of Text Inputs: varInspection.columnname (Inputs are standalone.....not in an EditForm)
Thus far, by selecting a record in the gallery, it changes the display modes of the text inputs to view.
My issue is I've tried adding some formulas to my buttons to achieve the display modes of what I want but I can't get anything to work right. Can someone tell me what I need to add to these buttons by chance?
Overview of my buttons and other variables I've set:
-I've set a variable in OnSelect of my gallery to = Set(varInspection,ThisItem), the variable is then used in the default property of the input controls to show current selected record in the gallery.
- Add Btn= Purpose of this is to clear the input controls to blank so I am able to add a new record...currently has a variable through OnSelect = Set(varInspection,Blank()) which clears the Input Controls to blank
So....wrapping this together, I need these input controls to be in view mode initially upon a user viewing the screen without interacting with it. I also need to add formulas to each of my buttons to manipulate the display modes of the input controls. My apologies if some of this is a bit confusing but thank you in advance for any help....much appreciated!