Script include for a reference qualifier help

Bidduam
Tera Guru

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 NameField typeOption names
u_rec_issueselect boxAir Conditioning
  Desks
  Rooms
  Plumbing

 

 

Variable NameField typeOption names
u_rec_floorselect boxGround Floor
  First Floor
  Second Floor
  Basement

 

Variable NameField typeField nameChoices
u_rec_locationreferencecnm_location_typeroom
 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 🙂

5 REPLIES 5

@Rajesh Chopade1 

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'

Bidduam_0-1723679638371.png

 

And these are my variables

Bidduam_1-1723679792451.png

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?