Skip to main content
Solved

FSM Mobile - conditional read-only field


WilsonX
Sidekick (Employee)
Forum|alt.badge.img+5
  • Sidekick (Employee)
  • 23 replies

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

Best answer by Shneor Cheshin

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!

View original
Did this topic help you find an answer to your question?

2 replies

Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • 1131 replies
  • Answer
  • February 16, 2024

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!


WilsonX
Sidekick (Employee)
Forum|alt.badge.img+5
  • Author
  • Sidekick (Employee)
  • 23 replies
  • February 17, 2024

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings