Script include for a reference qualifier help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2024 07:25 PM - edited 08-14-2024 12:31 AM
So I need to have a script include in order to cover a couple of scenarios for an advanced filter on a reference variable field on an incident record producer.
Ultimately what I want to do is make it so if a user selects 'Room' in the issue field and 'second floor' in the floor field, then the Location select box will only show second floor rooms.
Likewise if they choose 'Desk' and 'Ground Floor' then only the ground floor desks are shown.
But then if they choose anything else as an issue (eg, plumbing or air conditioning) then everything is shown for the floor they choose.
Hope that makes sense?
The variable fields I have are:
Variable Name | Field type | Option names |
u_rec_issue | select box | Air Conditioning |
Desks | ||
Rooms | ||
Plumbing |
Variable Name | Field type | Option names |
u_rec_floor | select box | Ground Floor |
First Floor | ||
Second Floor | ||
Basement |
Variable Name | Field type | Field name | Choices |
u_rec_location | reference | cnm_location_type | room |
Location [cmn_location] | desk |
Would really love help please - I have limited experience writing a script include and am not even sure how to tell it to look at the 'current' record calling it and to use the values from the variables on that record producer.
Much appreciate the assistance thanks 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2024 04:57 PM
Thank you for the great response, unfortunately it isn't working at this stage. I have added your code to a script include, however I will note that I don't have any custom fields on the cmn_location table. There is a field on the table called 'parent' that shows the floor name and if I go into that record it is store in a field simply called 'name'
And these are my variables
I also can't see how I can add two variable names in the Catalog Client Script? It is just a drop down and only allows selection of one option and you can't type into the field?