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 

Are you able to give an example based on my fields?

Also how would the reference qualifier look for example if I called my script include - location_results?

 

As in what would I put in the field?