In the mobile app - What is the best way to remove a choice from a choice list?

Jack Hoblyn
Tera Contributor

I'm currently optimising a form in the mobile app in Studio and need to do what appears to be client side scripting.

 

In the app on Work Order Tasks, the user presses a button and a list of options come up. I would like to hide an option or two from that list on mobile.

 

In desktop view it would be a UI Policy or Client Script with:

 

g_form.removeOption('u_on_hold_reason', 'risk_assessment_failed');

 

However I cannot find anywhere to place such a script in mobile app as it appears there is no client side scripting options.

 

Does anyone know an alternative solution?

 

 

5 REPLIES 5

RaghavSh
Kilo Patron

There is an option of mobile UI policies in studio and legacy view as well. I am sharing the screenshot from legacy view below but it will allow you to remove the options.

 

Screenshot 2022-11-08 at 6.01.36 PM.png

 

One thing you can try is you can write client script with g_form.removeOption('u_on_hold_reason', 'risk_assessment_failed'); and set the UI type of client script as mobile/portal


Raghav
MVP 2023
LinkedIn

Thanks for the response!

 

How would I go about removing options from a choice list similarly to  g_form.removeOption('u_on_hold_reason', 'risk_assessment_failed'); in one of these Mobile UI Policies?

 

It appears to be the case that there is no option to use scripts here and the only thing I can alter are actual fields themselves.

 

Screenshot 2022-11-08 at 14.02.57.png

Also worth noting that using Client Scripts/UI Policies in legacy don't work at all regardless of the UI Type.

@Jack Hoblyn yes so it doesn't seems to be possible.


Raghav
MVP 2023
LinkedIn