order guide variables

mrcarter
Tera Contributor

I have an Order Guide for a standard new user.   In have set various questions which then trigger various items to be added.   Most of the bits on the describe needs are variables but one ia variable set.   The variable set is to capture the requested for which potentially can be for a user not in the system yet so we then have variables in the set to ask for first name, last name, email, phone etc.

I only want to capture this once in the describe needs form however that variable set appears in 90% of the items that will be triggered in the choose options section of the order guide.   I can hind individual variables simply by editing the individual items and saying not availble on order guides rather than all these client scripts people refer to.   However the variable set cannot be controlled this way.   So first off I need to make sure the variable entries captured for the requested for variable set will cascade to the items forming the request and secondly that the variable set is not then visible on every single item.

I have seen many different ways of going things with variables and variable sets but none quite seem to ring true with my scenario.

PLease help

1 REPLY 1

mrcarter
Tera Contributor

I have used the script



function onLoad() {


      var item = $("current_item");


      var guide = $("sysparm_guide");


      if (item != null && guide != null && item.value == guide.value)


              return;


      g_form.setDisplay('YOUR_VARIABLE_SET_NAME', false);


}



which works for one of my variable sets.   The next issue is some of my items have a variable set called single user inc not in directory and the others have multi user inc not in directiry.   The first one I can hide but if I reuse the script for the second variable set it has not affecy.   Now I know to cascade variables from the decribe needs through the others they hae to be the same which is what migth be causing the issue.



Does this mean that I have to create the 3 items for multi user possibilities as single user only just for order guide purposes?