How to make a UI action disappear after it was clicked and have another UI action appear?

Linda6
Mega Guru

Hi!

I have the change task form and there is a UI action 'Request four eyes check'. When the change task is in phase 'Implementation', the UI action 'Request four eyes check' is visible. When I click on it, the 'Phase' value changes to 'Deployment', the 'Request four eyes check' UI action should disappear and another UI action called 'Deploy change' shall appear.

I have checked quite a plenty of articles here, but really didn't find anything relevant or what would seem a best practice...

I am having trouble finding out how to make one UI action disappear and another one appear. What is the best practice here, please?

This is the form:

find_real_file.png

This is the UI action I have made so far:

find_real_file.png

Thank you very much in advance

 

 

1 ACCEPTED SOLUTION

palanikumar
Mega Sage

Add the below condition to the existing condition. This will make sure the UI Action visible only for 'implementation' phase.

&& current.u_phase == 'implementation'

 

For Deploy Change UI Action you can add the below condition

&& current.u_phase == 'deployment'

Thank you,
Palani

View solution in original post

6 REPLIES 6

palanikumar
Mega Sage

Add the below condition to the existing condition. This will make sure the UI Action visible only for 'implementation' phase.

&& current.u_phase == 'implementation'

 

For Deploy Change UI Action you can add the below condition

&& current.u_phase == 'deployment'

Thank you,
Palani

Allen Andreas
Administrator
Administrator

Hello,

As mentioned, you have no phase condition set, so you'd need to add that otherwise it'll show when the other conditions are met.

Thanks


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Linda6
Mega Guru

Thank you guys, I would never have imagined the solution is this easy....thanks to you!

Hello,

Since you are using a save/submit type outcome in the result, the page is refreshing, so then the conditions are reevaluated, of course. Otherwise, no, this approach would not have worked if you were just changing it on the form (client side) and not saving...

Someone, already had conditions in there so this wasn't a foreign concept completely. Perhaps you didn't build this originally.

Glad you were able to figure it out.

Take care!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!