Help filtering variable reference field from another variable value

Bidduam
Tera Guru

I've done a pretty good search for the answer to this already and viewed a lot of posts on this same topic, however I still cannot understand well enough to make it work for me, so I'd really appreciate someone who can 'hold my hand' please and assist.

 

I have a record producer on the incident table that is for building faults, I have a variable that asks what the issue is with and there are a number of options for users to select from.

If they select "Desks" for example the next field that will be required is for them to enter the desk number, which we have a list of on the cmn_location table.

What I'd like to do is to only show desks when desks are selected, or only show rooms if rooms are selected and show all if they choose something else like air conditioning for example.

 

The variable fields I have are:

 

Variable NameField typeOption names
u_rec_issueselect boxAir Conditioning
  Desks
  Rooms
  Plumbing

 

 

Variable NameField typeField nameChoices
u_rec_locationreferencecnm_location_typeroom
 Location [cmn_location] desk

 

Any assistance would be very much welcomed thank you.

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Bidduam 

 

1. Define the choice values of u_rec_issue field based on the choice values in cmn_location_type field e.g. Room choice has a choice label Room and choice value room. Desks has choice label Desks and choice value desk. 

 

2. Apply the following reference qualifier on the u_rec_location variable

 

javascript:'cmn_location_type='+current.variables.u_rec_issue;

Screenshot 2024-08-13 at 8.19.29 AM.png

 Hope this helps.

View solution in original post

5 REPLIES 5

Sandeep Rajput
Tera Patron
Tera Patron

@Bidduam 

 

1. Define the choice values of u_rec_issue field based on the choice values in cmn_location_type field e.g. Room choice has a choice label Room and choice value room. Desks has choice label Desks and choice value desk. 

 

2. Apply the following reference qualifier on the u_rec_location variable

 

javascript:'cmn_location_type='+current.variables.u_rec_issue;

Screenshot 2024-08-13 at 8.19.29 AM.png

 Hope this helps.

@Sandeep Rajput 

Thank you very much, I was very close, but a couple of little things made a huge difference as they normally do!

 

This is what I had originally:

javascript: 'cnm_location_type=' + current.variables.u_rec_issue

 

And yours:

javascript:'cmn_location_type='+current.variables.u_rec_issue;

@Sandeep Rajput 

Sorry one more question, I only really want to filter if either room or desk is selected, how would I make it so the filter doesn't apply if anything else is selected?

@Bidduam In this case you need to create a script include based reference qualifier where you can check the condition and return the qualifier string accordingly.