Skip to main content
Solved

Hide/Show field in side panel of Tab

  • Jan 29, 2024 3:11 PM UTC
  • 2 replies
  • 150 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!

View original

2 replies

Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • Answer
  • Jan 30, 2024 1:47 AM UTC

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)
  • Feb 1, 2024 8:20 AM UTC

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