Dependent Variables on catalog item

kmickael
Tera Guru

Hi

We have created 2 tables u_departement and u_service.
In the u_service table, we have a reference field (u_parent) to the u_departement table.

On a catalog item we have two fields Direction and Service

We want to filter on the Service field in relation to the value of the Direction field

Capture.JPG

1 ACCEPTED SOLUTION

kmickael
Tera Guru

eHi Thank you for your help



I solved the issue !



i add a reference qualifier in the second field "Service" like that:



Capture.JPG


it's work



thank you


View solution in original post

5 REPLIES 5

Chuck Tomasi
Tera Patron

Unfortunately, variables do not have a dependency like fields on a form do.



For choice fields... use a catalog client script that does a GlideAjax call to get the proper values and populate them in the dependent field. You might find episode 33 of TechNow helpful in constructing your solution. We did something very similar.



Hint: don't forget to return the sys_id AND the display value and the value.



TechNow Episode List



In your case, you are using reference fields... I need to think about that (unless you can change things.)


Harsh Vardhan
Giga Patron

is there any relationship between these two reference table.


if yes then you can use reference qualifier.



http://wiki.servicenow.com/index.php?title=Reference_Qualifiers#gsc.tab=0


kmickael
Tera Guru

eHi Thank you for your help



I solved the issue !



i add a reference qualifier in the second field "Service" like that:



Capture.JPG


it's work



thank you


Hi kmickael,

 

I have similar requirement, I have two lookup select box fields country(refers to core_country) and company(refers to core_company) . On company I have one custom(list collector) field which refers to country table on company form.

Now on variable set if I select company variable, its related country values(mentioned in custom field) should populate. 

Can you help me on this please.

Thanks,