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

That is correct János 

Hi,

Sounds great and again, the concept of my reply is still relevant.

With that said, do you have any questions or thoughts about the replies you've received? Anything else we can help with?

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


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

-O-
Kilo Patron
Kilo Patron

The standard/official API to check in Catalog Client Scripts on Portal is:

g_service_catalog.isOrderGuide()

But it only works in Portal, if you want it to also work in CMS you need a more complicated solution described in another post: Pass Order Guide Variables to Catalog Task Without Showing in in each Catalog item in Order Guide.

However I would create two Catalog Client Scripts in that case: one that only applies to Portal and another that only applies to CMS - with help of field UI Type on Catalog Client Scripts.

Also there there are other caveats you need to take into consideration: g_service_catalog.isOrderGuide doesn't work anymore - though this is a situation that might not apply to you.

I suppose it is clear by now that you need to handle it in Catalog Client Scripts.

Though it can be done with A variable set containing just on variable: a Yes/No type called - say - Is Order Guide?. You would set the default value to No. You would then need to configure Order Guides to Cascade variables and create onLoad Catalog Client Scripts on Order Guides that set the same variable to Yes on load.

Thus when the Catalog Items are loaded on their own that variable would remain on No, but when loaded into Order Guides, it would be set to Yes by cascading the value from the Order Guide (that was changed to Yes by the onLoad Catalog Client Script).

Then you could set variable visibility on Catalog Item with help of UI Policies, based on the value in variable Is Order Guide?. Of course, since this is just a "support" variable, you would make it always hidden.