Is there a way to cause a reference qualifier to get the most recent data for a variable on an order guide?

Drew8
Tera Guru

I have a reference qualifier on a catalog item that gets pulled into an order guide. I did some logging and noticed that current.variables.requested_for in the reference qualifer is not returning a value. I'm thinking it's because the reference qualifier is evaluating before the value gets set? Can you think of any reason why that wouldn't be working?

1 ACCEPTED SOLUTION

Turned out what I was experiencing was a bug with select boxes on order guides with cascading variables. The issue was resolved in San Diego Patch 6.

View solution in original post

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hello,

Sorry, your post is a bit confusing.

Are you saying the variable is on the order guide, not the catalog item itself? But that the reference qualifier is on a variable...in a catalog item (that was attached via Rule set)?

You won't have access to any order guide variables, directly.

You'd want to cascade that value or fill that value in (from the order guide) to a variable on the catalog item, or...you'd have to get the value through accessing the order guide variable value through a method I describe here, in this article: https://community.servicenow.com/community?id=community_article&sys_id=61ccb3d9dbd0d110b5d6e6be13961...

So it may end up being a script include that you use in your reference qualifier to get the value and return the results that way.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi @Allen Andreas, yes it's a reference qualifier on a catalog item variable. That catalog item is then brought into the order guide via rule base. The requested for is a variable on both the catalog item and order guide but they are named the same so the value gets set on both. Are you still not able to get current.variable.requested_for if requested for is on both?

Hi,

You can, and just to ensure it's:

current.variables.variable_name

so the 's' on variables.

The reference qualifier gets evaluated each time you access that field. So initially when the form loads, it'll have a qualifier result, and then if it's a reference field, you go to access it either by typing or clicking the magnifying glass, it'll evaluate then too, so if your other variable has a value, it'll filter if you've setup the qualifier correctly.

It'd have to be something like:

javascript:"sys_id="+current.variables.requested_for

As an example ^

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Turned out what I was experiencing was a bug with select boxes on order guides with cascading variables. The issue was resolved in San Diego Patch 6.