Custom enumeration

0
Hi, I have a enum variable with 8 values. I want to display the values based on another drop down. For example: First drop down have the following values: a1,a2,a3,a4 Second drop down have the following values: w1,w2,w3,w4,w5,w6,w7,w8   So if a1 is selected : the second drop down should show all the eight values i.e. w1 to w8 If a2 is selected: the second drop down should show only the first four values i.e w1 to w4   could
asked
6 answers
0

You need those two drop down boxes connected the Entity that contains the screen rendering of those choices.

answered
0

You could create a sperate enum for each of the option for the each entry in the first enum. Then control selected of the second enum by adjusting it’s visibility based on the selected enum. If you do that you would have to create some logic that moved the proper selections to your final object. In other words this is not a good way of handling it. If you MUST use enums it would work.

I don’t think you can control the entries of enum at run time. That kind of defeats the point of them being enums. 

A better way is to have a table that holds the values of “A” Entries, and another table that holds the values of “W” then you simply associate which options in W go with each A object. Then on your form you put the first field then through its association the second field. If you want a sample of this. I can make you one.

answered
0

Hello Sherlin Susanna Shaji,

 

In drop down widget on enter event call a nanoflow in that write a bellow  java script action.

 

// BEGIN USER CODE


if(currentstage == 'a2'){
jQuery("select option:contains('w5')").remove();
jQuery("select option:contains('w6')").remove();
jQuery("select option:contains('w7')").remove();
}
// END USER CODE

 

get the currentstage as input parameter

 

answered
0

My domain Model @Kevin McGee

What should the page parameter for the page in which two reference selectors are present be? I did the following:

 

answered
0

I think I got the whole thing wrong.

This is the sample data that I was trying to associate.

answered
0

Hi, thank you Kevin McGee, using the information you provided, I was able to figure out the solution. The method that you had given is correct with just one change, the Association between Assembly code and Weld code is one-to-many, with Assembly Code being at the “one” side. I think it was a mistake in my question. Thank you once again for the time and effort that you had put into answering my question.

God bless you!

 

Thanks

Sherlin

answered