Skip to main content

Hi everyone,

I have a list screen where I need to hide fields based on the condition. Is it possible?

For example:

I need to hide the fields circulated
 

 

Hi ​@pedropraz 

You will need to create a client script and add it to the populate/refresh event

var listData = getCurrentListData();
var listLength = listData.length;
if (listLength > 0) {
for (var i = 0; i < listLength; i++) {
var row = getRowFromListData(listData, i);

var myfield = getValueFromListDataRow(row,'table_name','field_name');
if(myfield == 'my_value')
{
row = setValueOnListDataRow(row,"table_name","field_name_to_hide",'');
}

listData = setRowOnListData(listData, row, i);
}
}
return listData;

 

Cheers!


Hi ​@pedropraz 

You will need to create a client script and add it to the populate/refresh event

var listData = getCurrentListData();
var listLength = listData.length;
if (listLength > 0) {
for (var i = 0; i < listLength; i++) {
var row = getRowFromListData(listData, i);

var myfield = getValueFromListDataRow(row,'table_name','field_name');
if(myfield == 'my_value')
{
row = setValueOnListDataRow(row,"table_name","field_name_to_hide",'');
}

listData = setRowOnListData(listData, row, i);
}
}
return listData;

 

Cheers!

Thanks ​@Shneor Cheshin 


Reply