variable assignment not working in order guide

patricklatella
Mega Sage

Hi gang,

I'm building an order guide for a client, and am setting up rule bases for the catalog items and am creating item variable assignments to set the value of a couple fields...one field is working (a select box type variable), and one is not.  The one that is not working is a reference field...but not sure why that might be an issue.  In the rule base I am able to set the Value of the reference field on the catalog item variable through the item variable assignment...but it's not working?  Any thoughts?  Thanks!

1 ACCEPTED SOLUTION

patricklatella
Mega Sage

and figured it out...there was another onLoad catalog client script blocking the item variable assignment

View solution in original post

3 REPLIES 3

patricklatella
Mega Sage

upon further investigation...the both the variables I'm trying set values for through the rule base are part of a variable set, and there is an onLoad catalog client script that is also setting the value of the field that is not working according to the URL...I'm thinking this might be the issue...would this catalog client script override the rule base if the item is shown in an order guide?

Here's the catalog client script:

function onLoad() {
//Type appropriate comment here, and begin script below
var url = ""+window.location;
var ind = url.indexOf('sysparm_app');
if(ind>-1){
g_form.setValue('item_choice',''+url.substring(ind+12,ind+32+12))
}
}

patricklatella
Mega Sage

hmmm...actually no, that didn't fix it...I deactivated that client script and the reference field on the catalog item is still not being set by the item variable assignment.

patricklatella
Mega Sage

and figured it out...there was another onLoad catalog client script blocking the item variable assignment