- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 07:06 AM
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.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 08:49 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 08:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 08:23 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 08:33 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2016 08:40 AM