Advanced Reference Qualifier on sys_user reference field

Magali Legaspi
Tera Contributor

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!

2 REPLIES 2

Allen Andreas
Administrator
Administrator

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:

AllenAndreas_0-1674143358391.png

 

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!

Hello Allen! I appreciate your help 🙂

 

I did what you said but now it's not working at all:

 

MagaliLegaspi_0-1674218092190.png

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!