Skip to main content
Question

Fsm Mobile - Hide field in List Screen

  • March 17, 2025
  • 2 replies
  • 21 views

Forum|alt.badge.img+3

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
 

 

2 replies

Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • 1182 replies
  • March 17, 2025

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!


Forum|alt.badge.img+3
  • Author
  • Do Gooder (Partner)
  • 6 replies
  • March 18, 2025

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