Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How can I filter reference field based on another field

reddy8055
Tera Contributor

Hi,

I have two reference fields on the catalog form, one is Requested for field (refers to sys_user table) and it auto-populates logged in user name.

Another field is Course completed field (refers to custom table). Now whenever requested for field auto-populates it should filter the records in course completed field based on requested for user email.

For example, in custom table I have 3 records with xxx@service-now.com it should show all three records based on requested for field.

 

Thanks,

4 REPLIES 4

Murthy Ch
Giga Sage

Hi @reddy8055 

In the course completed variable in reference qualifier section use below logic:

javascript: "emailFieldName="+current.variables.requested_forVariableName.email.toString(); //replace emailfieldname with email field name in your custom table and replace with requested for variable name in catalog

Screenshot for your reference:

MurthyCh_0-1668402819590.png

MurthyCh_1-1668402865309.png

 

Hope it helps:)

 

Thanks,
Murthy

Hi Murthy,

Its working, but I want to add AND additional condition and its not working with that condition. There are different types of title and I want to show Only CyberMe 2022 along with requested for email

 

javascript:"u_email_id=" +current.variables.requested_for.email^u_title=CyberMe 2022 (O)

 

Thanks

Hi @reddy8055 

Small error only just update like the below at the end:

javascript: "u_email_id=" +current.variables.requested_for.email+'^u_title=CyberMe 2022 (O)';

//Make sure the title value will be correct

MurthyCh_0-1668483136485.png

 

Hope it helps:)

 

Thanks,
Murthy

Hi @reddy8055 

Did you checked the above reply?

Is it working?

Thanks,
Murthy