Advanced Reference Qualifier on sys_user reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2023 07:25 AM
Hi all!
I'm having this issue. I'm working on a catalog item. What I need to do is on a sys_user reference table field, I need to make two conditions:
First one is hire date is on the future (after today) and company is Italy. I got that working.
But I have another field on the form which is "Hire Date". I was requested to: If a user chooses a date on the hire date field, it should only show users who have their hire dates on that day only.
I guess it should work as an OR condition? I'm pretty new to ref qual so any help is very much appreciated. So far I got this which is not working, only the first part:
u_hire_date>javascript:gs.endOfToday()^company=29b37daadb09a7088f81199f299619f9^NQu_hire_dateONcurrent.variables.hire_date
Thanks in advance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2023 07:49 AM - edited 01-19-2023 07:52 AM
Hi,
You'd want to build out your filter for hire date after today and company is Italy in a sys_user list view and then right-click the last piece of the breadcrumb and choose copy query:
Then in reference qual you can use something like:
javascript: var dt; if (current.variables.hire_date != '') { dt = "u_hire_date="+current.variables.hire_date } else { dt = "paste_copied_query_here"; } dt;
the forums are stripping the colon off of javascript, but it's javascript and a : together with no spaces.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 04:36 AM
Hello Allen! I appreciate your help 🙂
I did what you said but now it's not working at all:
javascript:var dt; if (current.variables.hire_date != '') {dt = "u_hire_date="+current.variables.hire_date^company=29b37daadb09a7088f81199f299619f9} else { dt = u_hire_date>javascript:gs.endOfToday()^company=29b37daadb09a7088f81199f299619f9; } dt;
I'll appreciate if you'll guide me through this.
Thank you!