cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bvandyke22
Helper III
Helper III

Edit Form Button

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.

 

Bvandyke22_0-1614970305370.png

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Suchitra1996
Resolver II
Resolver II

@Bvandyke22 

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.

 

 

 

View solution in original post

1 REPLY 1
Suchitra1996
Resolver II
Resolver II

@Bvandyke22 

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.

 

 

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (98,019)