- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 10:59 AM
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.
Just in case here are the labels in the dmn_demand table.
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.
Any suggestions would be appreciated.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 11:54 AM
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 10:48 PM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 07:27 PM - edited 04-04-2024 07:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 04:24 AM
@Sandeep,
You Sir, are a genius. Thank you again for working with me to the conclusion and taking time to guide me through the process.
I did change type to "all" but not sure if that was the issue as I found a slight mismatch in the variable name, which I corrected and got it to work.
I appreciate all the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 04:28 AM
He is Genius.. I Know..
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 05:02 AM
@Scott93 Glad to know that it finally worked for you 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 10:48 PM
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.