Skip to main content
Solved

Hide/Show field in side panel of Tab

  • January 29, 2024
  • 2 replies
  • 121 views

Forum|alt.badge.img+9

Hi All,

Is it possible, based on a criteria of a other field, to hide/show a field in the side panel of a Tab?
I tried with setControlVisibility, setTabItemVisibility, setRowControlVisibility.

 

Best answer by Shneor Cheshin

Hi @drooij 

This is a data table row, so your script should be related to the rows.

You did not share your script, so it is hard to say where the issue is. But setRowControlVisibility should work.

In the example below, I have a script for after the value changes on the ‘Revision’ field. When it is ‘HIDE’ I will hide the ‘Serial #’ field above it.

 

My code

var selectedRow = getDataTableSelectedRows('request_unit')[0];
var revision = getRowControlValue(selectedRow,'request_unit','revision');
alert('revision: ' + revision);
if(revision=='HIDE')
{
setRowControlVisibility(selectedRow, 'request_unit', 'serial_id', false);
}

Cheers!

2 replies

Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • Answer
  • January 30, 2024

Hi @drooij 

This is a data table row, so your script should be related to the rows.

You did not share your script, so it is hard to say where the issue is. But setRowControlVisibility should work.

In the example below, I have a script for after the value changes on the ‘Revision’ field. When it is ‘HIDE’ I will hide the ‘Serial #’ field above it.

 

My code

var selectedRow = getDataTableSelectedRows('request_unit')[0];
var revision = getRowControlValue(selectedRow,'request_unit','revision');
alert('revision: ' + revision);
if(revision=='HIDE')
{
setRowControlVisibility(selectedRow, 'request_unit', 'serial_id', false);
}

Cheers!


Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • February 1, 2024

Thanks @Shneor Cheshin, apparently I was already very close. But with the help of your example I was able to make it work!