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

Service Portal - Catalog item variable reference qualifier not working

shill
Mega Sage

In reviewing the Service Portal, I've noticed that they item widget does not seem to accept a reference qualifier I have on some of my variables on a few items.

The variable is a Lookup Select Box type variable that references another table using the sys id as the lookup value field.

The qualifier is calling a script include to return sys id's for a reference field.

This all works in the base standard catalog, but does not show any selections in the Portal.

Any ideas on what may be the issue?

1 ACCEPTED SOLUTION

I was able to get this working by changing the variable type to Reference.



Not a great UX in the catalog, but from the Service Portal the UI is nearly identical. When it is a reference, it appears the reference qualifier is run when you click on that field rather than just onload as with the Lookup Select variable type.


View solution in original post

16 REPLIES 16

will_leingang
ServiceNow Employee
ServiceNow Employee

This should work in Istanbul. Can you please describe your scenario with details about how each of your variables are configured? See the attached slide deck for an example of what I know is working. Your situation might be an edge case we need to address.


I am having the same issue, in Istanbul. I have a catalog variable called "asset_name" that I am trying to populate via a Lookup Select Box as defined below. I am referencing the alm_hardware table and limiting the lookup by only assets where the assigned_to == the requested_for of the cart and the model_category is specified.



This works fine in the "internal" Service Catalog, but not in the portal. The Lookup Select Box doesn't populate in the portal.



Thoughts?   Thanks,



Artie



find_real_file.png


HI Artie,



Did you get this work? i am having the same issue can u please help me?



Regards


Swamy


I just returned to this today and tried changing the variable type from "Lookup Select" to "Reference", as suggested by brian. above. Unfortunately, this didn't work at all. Now my reference qualifier is broken on both the internal catalog and the external portal, and no records are found in either environment.



So I now have no solution for displaying a reference-type field in the portal that contains a reference qualifier. will.leingang can you help us troubleshoot this?


I found a few more related threads on this. Following Lookup selectbox reference qualifier and Reference Qualifier on Lookup Select Box Variable   I added ref_qual_elements=current.cart.requested_for to the "Variable attributes" field of the variable definition form. Unfortunately, this didn't fix the issue in the Service Portal. Still doesn't work.



Also see this thread: Reference Qualifier on Lookup Select Box Variable   and note sbolton's comment that none of this works in the Service Portal. I think I'll try this client script approach next...