Skip to main content

Hi All, 

 

There is a requirement to limit one of the fields drop down values in the tab level.

I was able to achieve this in the header level using the below script in the Client script.

if (size(codeList) != 0)
{
if(codeLists0].code_value != null)
{
var option1 = =];

for (var i=0; i<size(codeList); ++i)
{
var codeValue = codeListsi].code_value;
var description = codeListsi].description;


var opt1 = createCodeTableOption(codeValue,description);

arrayPush(option1,opt1);
}

setControlOptions('model_param_rules', 'hierarchy_code', option1);
}
}

But it seems the above code is not working in the tab level.

 

Another similar thread related to the same question.

 

Limiting DropDown value based on specific parameter | IFS Community

 

Any idea or the example code, how to achieve this requirement in the tab level?

 

Thanks,

Hasara

Hi @Hasara Gunasiri 

According to the previous thread and fyi, there has not been a function introduced to populate the dropdown values on list level even though this is there and working fine at the control level (header level).

Usually the list items need to have setRowControl(setRowControlValue, setRowControlEnabled etc.) type functions but here there is no such specific function in the client script library like "setRowControlOptions" to populate the dropdown values on the list level. Better to raise this to RnD as a question why it has not been in place for row control level.

 


Hi @Hasara Gunasiri 

As mentioned in this thread by Saranga, and in the other thread. This is not possible to achieve.

Your options are, depending on the use case:

  • Use a lookup field.
  • Create a hierarchy by populating the ‘Parent’ code (Global Code Table).
  • Create a duplicate code table where only the relevant values are populated.

Cheers!


Reply