The CreatorCon Call for Content is officially open! Get started here.

Reference Qualifier question

Sam10
Tera Expert

Hi Guys,

 

I'm stuck in this issue for hours and hours and appreciate if anyone can jump in and help me out with this. 

 

So I have a catalog item, there's two fields. branch (select_branch) and member (Member). These two are reference fields that looks up to the table "u_branchmembers" and the technical names in the table for those two are u_branch and u_member respectively.

 

So when somebody open up the form and select a branch , I need the options in the drop down to filter and show members who are part of that branch. (branch and members have a 1 to Many relationship).

eg: u_branchmembers

MemberBranch
Ashley BarnesNew York
Kate Infield Detroit
Daemon Wayne New York
Ashley Barnes Detroit 

 

When selected Branch is New York or Detroit, two options should be shown but Ashley Barnes should be an option both times as she is a member of both branches. 

 

 

 

 

 

 

How do I accomplish this? 

6 REPLIES 6

Slava Savitsky
Giga Sage

Are you saying both reference fields point to the same table? But you want to select different entities in each of them, right? Branches in one and people in the other. It is not going to work like that. You need to point each of the reference fields to the appropriate table. The same tables as u_branch and u_member fields point to. I assume they are reference fields too?

Hi Slava,

 

Yes both the reference fields are pointed to the same table.

Right now, through the form when I click on Branch, I see the Cities (New York, Detroit etc) and when I click on the Members field drop down, I see all the members. (Idea is when a particular city is selected, members drop down options to be updated and show members from the table who have branch set as the branch selected in the field above in the form)

 

Hello @Sam10 ,

 

I would suggest to use Auto-populate functionality of servicenow.

 

Rajesh_Bhise_0-1721235927780.png

 

As shown, you can choose existing reference field i.e. branch in your case and reference table will auto-populated there. Also third field will populate which will give you option to use another reference field in member variable.

 

Please try the same and let me the outcome.

 

Please mark this answer correct helpful if this post helps to learn something new.

 

Thank You,

Rajesh

I understand that "select_branch" and "member" in your catalog item are reference variables and that both point to "u_branchmembers" table (which I find strange). But what field type are "u_branch" and "u_member" fields in "u_branchmembers" table?