Solved

FSM Mobile - conditional read-only field

  • 16 February 2024
  • 2 replies
  • 28 views

Badge +4

How to set a field on mobile as read-only if it is other than empty?

icon

Best answer by Shneor Cheshin 16 February 2024, 01:41

View original

2 replies

Userlevel 6
Badge +26

Hi @WilsonX 

You can use a client script and attach it to the refresh event (Or any other relevant event).

var control = getControlValue('table','field');
if(isNullOrEmptyString(control)){
setControlEnabled("table","field",true);}
else{
setControlEnabled("table","field",false);}

Cheers!

Badge +4

Successfully resolved. thank you very much
1- I copied the default escript client used in the overview screen (do_refresh)
2- I created a new mobile-type script client
3- I pasted the copied script and at the end I included the script as instructed.

4- I changed the script used on the screen to the new one created in Refresh

var control = getControlValue("task", "user_def13");
if (isNullOrEmptyString(control)) {
setControlEnabled("task", "user_def13", true);
}
else {
setControlEnabled("task", "user_def13", false);
}

 

Reply