Need help with Reference qualifier on Catalog Item Variable

GaryJHayes
Tera Guru

find_real_file.png

Hi,

I am trying to set a Lookup select box to work with a dependant field.

The dependant field is called current.variables.request_source. (Possible values: internal/external)

This does a direct lookup from the Choices list of the backend table

The reference qualifier I am using is:

javascript: "name=u_XXX_access^inactive=false^element=u_work_type^dependent_value=" + current.variables.request_source + "^EQ"

This works correctly and exactly as expected in the Service Portal but in the Platform UI Service Catalog the menu is always empty

As a test I tried replacing the variable with a fixed string like this:

javascript: "name=u_XXX_access^inactive=false^element=u_work_type^dependent_value=" + 'internal' + "^EQ"

 Then it work in both Service Portal and Platform UI Service Catalog (but obviously is not dependant)

Anyone have any suggestions why this qualifier is not working in the Platform UI Service Catalog?

1 ACCEPTED SOLUTION

GaryJHayes
Tera Guru

OK, so I figured out the answer myself and here are the details for anyone else who has this problem

While this technique works well of the Catalog Item when viewed from the Service Portal it needs to have additional configuration to make it work properly when accessing the Catalog Item from the Platform UI Service Catalog

On the Default Value tab(!) there is a Variable Attributes field and this needs:

ref_qual_elements=<variable used to filter>

In this instance:

ref_qual_elements=request_source 

Which matches the "current.variables.request_source" specified in the 'Reference qual'

With this in place the filters work in the Request Item in both the Service Portal and Platform UI Service Catalog

View solution in original post

11 REPLIES 11

I reproduced your query with a different name and different element, looks good.

If you reproduce this query on the Platform UI, on the List of the sys_choice table. Do you get result then?

Also see this article I wrote a while ago:
Utilizing the breadcrumb on lists to generate your query

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Thanks again for your help.

I tried the query in the Platform UI and got the correct results:

find_real_file.png

This query seems to work everywhere but in the Platform UI Service Catalog

Hi Gary,

Did you check query business rule on that table is restricting that?

Regards

Ankur

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

Odd. If the query is the same, it should be able to work with advanced reference qualifier.

You could try to copy the query from the breadcrumb, literally paste it in your reference qualifier. Does it work then?
If so, piece by piece make it dynamic (with applying current.variables.request_source or something).
If not, something different is going on. Maybe ACL? Query Business rule?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

GaryJHayes
Tera Guru

OK, so I figured out the answer myself and here are the details for anyone else who has this problem

While this technique works well of the Catalog Item when viewed from the Service Portal it needs to have additional configuration to make it work properly when accessing the Catalog Item from the Platform UI Service Catalog

On the Default Value tab(!) there is a Variable Attributes field and this needs:

ref_qual_elements=<variable used to filter>

In this instance:

ref_qual_elements=request_source 

Which matches the "current.variables.request_source" specified in the 'Reference qual'

With this in place the filters work in the Request Item in both the Service Portal and Platform UI Service Catalog