Skip to main content
Solved

Limit dropdown values in the tab level


Forum|alt.badge.img+5

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(codeList[0].code_value != null)
		{
			var option1 = [];

			for (var i=0; i<size(codeList); ++i)
			{
				var codeValue = codeList[i].code_value;
				var description = codeList[i].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

Best answer by SAMLK

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.

 

View original
Did this topic help you find an answer to your question?

2 replies

SAMLK
Hero (Partner)
Forum|alt.badge.img+13
  • Hero (Partner)
  • 226 replies
  • Answer
  • December 7, 2023

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.

 


Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • 1137 replies
  • December 7, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings