Record Producer Select Which Variables Appear on Drop Down Menu

Scott93
Tera Contributor

On our demand table we have a routing precedence column with 5 different labels.  The demand table and routing precedence labels are shared across many different catalog items /record producers.   

 

There is a request for one particular record producer to only show two of the 5 different lables on the drop down menu. Below are the 5 choices.  We only want Low and Urgent to appear. 

 

Current choices but only want two of these to appear.Current choices but only want two of these to appear.

 Just in case here are the labels in the dmn_demand table. 

demand table routing precedence column choices.jpg

 

Issue is most options search the demand table's list view to return values.  In our case we want to populate the demand table's routing precedence fields with the choice selected in the record producer.   

 

I believe the best option is the Lookup Select Box but I cannot filter out 3 of the column labels to just show Low and Urgent on the submission form. 

 

There are a lot of enteries on the Developer Forum such as filter to show choices from the sys_user table list view but I haven't had any luck in options for the Lookup label field(s) or Reference qualifiers.  Not as easy as adding "Low,Urgent" or "u_Low,u_Urgent" in the label field.

 

lookup select box.jpg

 

Any suggestions would be appreciated. 

2 ACCEPTED SOLUTIONS

@Scott93 You should add the client script in the Client Script related list of the Record Producer. The What is will contain script is a server side script and it will not be able to run the client side code.

 

Screenshot 2024-04-05 at 12.21.43 AM.png

View solution in original post

Jim Coyne
Kilo Patron

The actual simplest way to solve the problem would be to use a Select Box and enter in the 2 choices with the same values and labels as the ones from the Demand table.

 

Duplicates choices, yes, but the less code we use, the better: easier maintenance and less chance of problems.

 

What you are doing now is getting values from another table, adding them to the drop down list and then removing more options than what you are leaving behind.  And anyone maintaining this after you has to be aware of the Client Script that removes the options (not an obvious thing, especially for a junior developer).  You are just adding complexity for no good reason.

 

The first answer to solving a problem should NOT be adding more code.

View solution in original post

10 REPLIES 10

Thank you Jim.   I agree 100% but in our current development we are stuck with sharing the values from the dmn table.  Again, agree and when there is time I'd like to review various Select Box local variables vice sharing from dmn_demand.