Parent children fields dependent on Record Producer

Giovanni Tambur
Tera Expert

Hello everyone, I need to create two fields on a Record Producer connected to the cmn_location table, the first that shows me all the values of the locations that have no parent and the other that only shows me the values that have the Parent value selected on the first field.

The first field works, I configured it like this:

01.png

And it shows correctly the data I need:

02.png

The second field, on the other hand, I can't configure it correctly, on "Type Specification" I can't find adequate conditions for the filter. I added on "Auto-Populate" the dependency to the question where the Parent is selected but this doesn't help.

03.png

This shows all unfiltered values:

04.png

When in this case, selecting Belluno should only show the fields Piazza dei Martiri and Piazza delle Erbe.

Obviously this is just an example so I can't set a Reference qualifier condition

05.png

Do you have any ideas to suggest, maybe OOB.

Sorry for my English

Thanks in advance,

Giovanni

 

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@Giovanni Tambur 

So 2nd variable should show locations whose parent is the value selected in 1st variable?

if yes then add this in advanced ref qualifier on 2nd variable

javascript:'parent=' + current.variables.firstVariableName;

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

you are right, it was my mistake, the variable was not "site" but "location". I changed correctly to:
javascript:'parent=' + current.variables.location;
and now it works

10.png

Thank you very much

View solution in original post

6 REPLIES 6

@Giovanni Tambur 

are you giving the correct variable name in advanced ref qualifier?

please give the correct variable name in english

I believe it's site in english so use this

javascript:'parent=' + current.variables.site;

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

you are right, it was my mistake, the variable was not "site" but "location". I changed correctly to:
javascript:'parent=' + current.variables.location;
and now it works

10.png

Thank you very much