Order Guide and Catalog Item Query

amacqueen
Mega Guru

I have a Catalog Item that is being used in an Onboarding Order Guide. The first question on the Catalog Item is 'Is this for New User or an Existing User - which are two checkboxes. Because this is being used in an Onboarding Order Guide only the New User checkbox is really appropriate there so my boss has manage to manipulate the Catalog Item so that when it's used in the Order Guide only the New User Variables are shown. So far so good however I have been tasked with making the Catalog Item when used on it's own only to show the variables for the Exisitng User. I'm OK with UI Actions however what I can't work out is how, when just using the Catalog Item, I can get it to show just the variables for the Exisiting User.

Any help at all would be gratefully appreciated.

Thanks

7 REPLIES 7

Allen Andreas
Administrator
Administrator

Hi,

Your post is a bit confusing because you're talking about an order guide and catalog item and you give all this detail, but then your question is really about the standalone catalog item and how to populate variables when an existing user is selected, correct?

It may be more beneficial in the future to just have that stated as your question else we're reading possibly excess information?

Outside of that, consider using catalog lookup definition to accomplish what you're looking for: https://docs.servicenow.com/bundle/rome-servicenow-platform/page/product/service-catalog-management/...

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


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

Allen Andreas
Administrator
Administrator

Hello,

For the existing variables for the current user scenario, you'd use a UI Policy to show them when the existing user checkbox is checked. Otherwise, don't show them.

In fact, you could do the same for the new user scenario as well. A separate UI Policy for when the new user checkbox is checked.

It may have been more beneficial to use a select box with the two choices, instead of separate checkboxes (as then you need to prevent then from checking both and it just allows silly outcomes like that).

When used with an order guide, in the rule set where you added that catalog item, you'd set the value of 'x' field to 'y' as part of that rule set, which then takes care of showing 'z' variables later down the line.

So in an onLoad client script, set an order higher than 100, and if the new user checkbox is not checked, then auto-check the existing user checkbox. This is because your rule set order guide setting will set the new user box to true as part of that process, so it handles it for you when in an order guide and then this client script handles it when it's solo.

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


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

I believe the ask is to not allow checking (or selection) the options. But those to be (correctly) checked and enabled based on whether the containing Catalog Item is requested on its own or as part of the On-boarding Order Guide.

Hi,

Thanks for your reply.

I believe we are having to somewhat read between the lines because their post isn't very clear.

Regardless, what I've mentioned above relates and would be a solution they could go with. My initial sentences around a UI Policy and only showing 'x' fields is relevant as well as the last part of what I wrote above around using the rule set to set the field when using an order guide...and then a separate client script on the catalog item itself which would be built to execute setting the field value necessary...which then the UI Policy I mentioned earlier kicks in.

You can use a UI Policy to hide those two checkboxes anyway and then set the values as I mentioned (if your concern is around those two checkboxes not even being present on the form). I think we get where I'm going with it.

In any case, we'll let the author respond and go from there.

Thanks!


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