Filtering a reference field based on another variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2025 12:22 PM
I have a custom location table with 4 location types (site, building, floor, room). All site records are the top of the tree and therefore cannot have a parent. All Building records, must have a parent of Site. All Floor records must have a parent of Building etc.
So in the Parent field, I want to limit the locations to only allow Sites records for Buildings etc.
In the reference specification, I switch to Advanced and put in this reference qual:
javascript: "switch (u_location_type.toString()) {default:case 'site':u_location_type='';break;case 'Building': u_location_type='Site';break;case 'Floor':u_location_type='Building';break;case 'Room': u_location_type='Floor';break;}"
What am I missing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2025 08:11 PM
Hi @toddjarman,
I created a Script Include and called it from a Reference Qualifier—it worked as expected.
Script Include