Solved

Hide/Show field in side panel of Tab

  • 29 January 2024
  • 2 replies
  • 54 views

Userlevel 2
Badge +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.

 

icon

Best answer by Shneor Cheshin 30 January 2024, 02:47

View original

2 replies

Userlevel 6
Badge +26

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!

Userlevel 2
Badge +9

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

Reply