Skip to main content

Hi All,

What is the syntax to hide fields based on uncheck of a check box in mobile. In short I want to hide 2 mobile fields when the other field checkbox is unchecked(unticked).

 

For example I want to hide part id and quantity when the From Part Needs check box is unchecked on the below mobile screen.

 

 

 

Thanks in Advance,

Pinmaya

Hi ​@Pinmaya Kumar Singh ,

Update the below script with your actual field names, then use it in the value change event of your desired field.

var IsChecked = getControlValue("tableName","columnName");
// Replace the placeholders with the checkbox table's name and column name

if (IsChecked == 'N')
{
    setControlVisibility('tableName','columnName',false);
// Replace with the table name and column name of the field you want to hide
}

 


var IsChecked = getControlValue("custom","from_part_needs"); 
if (IsChecked == 'N') 
{     
setControlVisibility('part_usage','user_def16',false);

 ​@Chethana 

I have written the above script but its not working not showing on mobile

 


var IsChecked = getControlValue("custom","from_part_needs"); 
if (IsChecked == 'N') 
{     
setControlVisibility('part_usage','user_def16',false);

 ​@Chethana 

I have written the above script but its not working not showing on mobile

 

Could you send a screenshot of the client script screen?


 

@Chethana 


 

@Chethana 

I can see a syntax error. Add '}' at the end of the script.


var IsChecked = getControlValue("custom","from_part_needs");
if (IsChecked == 'N') 
{     
setControlVisibility('part_usage','user_def16',false);
}

 

Added it ,still once i uncheck this custom field    user_def16 is still visible

do i need to declare part_usage ?

@Chethana 


Hi ​@Pinmaya Kumar Singh ,

You need to add this client script to the value change event of the ‘from_part_needs’ field in mobile.


Thanks so much  its working now ​@Chethana 


Reply