Advanced Reference Qualifier not working in Portal for Catalog Item

Waleska
Kilo Guru

We have a variable set that asks for a Building location (type of Reference) then we ask users to select a Floor (also type of Reference).

For the Floor variable I did the following in the Advanced Reference Qualifier:
javascript: 'u_building_locationIN' + current.variables.building_location;

This is working on the non-portal view of the Item (so when I was using "Try It") it was working. However, in the portal view (customer view). It is not working. Floor shows "No matches found" consistently.

I did some research and tried the Script Include method, where the script include will have "return 'u_building_locationIN' + building;". Same issue, works when I use the "Try It" option, but doesn't work when testing via the Portal view.

I am guessing it is something simple that I am missing, but all the coffee in the world is not helping me figure this out.

1 ACCEPTED SOLUTION

Turned out to be an issue with the Name calculation script I was using to create the Display name of Floor + Location. All fixed now.

Thank you everyone for the assistance. The fact that it worked on the Try it Now threw me off thinking it was just an issue with the javascript/script include, when the whole time it was an issue with a calculation script of a field within the Floor table.

View solution in original post

23 REPLIES 23

asifnoor
Kilo Patron

Hi,

under attributes, mention

ref_qual_elements = building_location.

This will ensure that the updated value selected in the variable building_location is passed to the reference qualifer.

Willem
Giga Sage
Giga Sage

Can you share a print screen of the Try now and Service Portal behavior?

 

Have you checked the System Logs in ServiceNow for any errors or info?

Service Portal Behavior:
find_real_file.png

 

Try Now Behavior:
find_real_file.png

When I checked the logs, I didn't see any errors related to actions I was doing. Will try to see if I can get more info.

Do you get any results in the Service Portal when you remove the reference qualifier?

Well. Looks like there is my issue. Nothing is showing up on the portal at all anymore. I will have to see what I broke in this process