filtering reference field based on variable selection

vibee
Kilo Expert

Hi,

I am currently trying to set up an OnChange Client script that filters a reference based on the choice of a variable selected before.

Scenario:

If user click "Corporate" or "Residence" in the emp_office_type field

the reference field should filter either 'nameLIKECorporate' or 'nameLIKEResidence'

how would I script this? I have one that filters a slushbucket, but that does not work for the reference field.

1 ACCEPTED SOLUTION

Vibee,



    You will have to use current.variables.emp_office_type not current.emp_office_type. How can I miss that





Thanks,


Abhinay




Please mark Helpful, Like, or Correct depending on the impact of the response


View solution in original post

6 REPLIES 6

Abhinay Erra
Giga Sage

Vibee,



  You will have create a advanced reference qualifier on the reference field as shown below


find_real_file.png



Thanks,


Abhinay




Please mark Helpful, Like, or Correct depending on the impact of the response


Hi Abhinay,



I tried it exactly as you have shown, but in this case I am getting "no records" results in the reference lookup.



I'm not sure why this is happening.


I actually need to change the conditions to



if emp_office_type = 'Corporate'


nameLIKECorporate



else if emp_office_type = 'Residence'


nameLIKECompany


It should work.


1) Can you check what are the choice values of variable "emp_office_type" not the choice labels


2)Attach a screen shot of your ref qaul.


3) What table is the reference field referencing? does that referenced table have field name with "name"



Thanks,


Abhinay




Please mark Helpful, Like, or Correct depending on the impact of the response


1) the Choice values are 'Corporate' and 'Chartwell'. Those are exactly how the values are named.


2)find_real_file.png


find_real_file.png


find_real_file.png



3) This is for the cmn_location table. There is a 'name' I used the nameLIKE.. query straight from the breadcrumbs.