
I have a work order app that has been working fairly well for almost a year now. One common issue we are running in to, is that sometimes details are left out of work orders, or incorrectly entered. I'm wanting to find a way to edit the original work order by pressing a button.
As you can see, the original work order is in display only format, while the progress, worker, and comments fields are editable. I would like to use the edit button added to change the display only fields to editable. I know I can make a new screen to do this, but if I had to do this for every group that would be adding 9 extra screens for a function that wouldn't need to be used that often. is there a code to use that can make this happen without needing new screens?
Hi,
You can make use of the context variable.
On click of the edit button, you can change the OnSelect property: UpdateContext({locEditable:true}).
then on the field that you want to be editable, you can change the display mode of those fields to If(locEditable,DisplayMode,Edit,DisplayMode,View).
Such that, when the user clicks on the edit button, the variable locEditable will be true which will set the displaymode of the View only fields to edit.
You will also have to set the OnVisible property of you current screen to UpdateContext({locEditable:false}) so that whenever the user comes to this screen, by default the display mode of the concerned fields in view only.
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.