Hello Experts,
this thread should be in stackoverflow but trying my luck here. Need help on javascript.
I wrote a script as below,
function z_checking_users_assigned(par) {
var posMSKEY = uGetEntryID();
var currentIDStore = "%$glb.SAP_MASTER_IDS_ID%";
uWarning("Position MSKEY: " + posMSKEY);
var sql = "select mcthismskey from idmv_link_ext2 where mcThisOcName = 'MX_PERSON' and mcothermskey = " + posMSKEY;
var userMSKEY = uSelect(sql);
uWarning("userMSKEY from database: " + userMSKEY);
if (userMSKEY.indexOf("!ERROR") >= 0) {
uError(userMSKEY);
} else {
uWarning("Entering the length check");
var attributeArray = userMSKEY.split("!!");
var l = attributeArray.length;
uWarning("Length of vector is: " + l);
if (l > 1) {
uWarning("Length is greater than 1, so setting global variable");
uSetGlobalVar("POS_MSKEY", posMSKEY);
var OutString = uRunJobNow(360);
uWarning("Result of Scheduling: " + OutString);
uSkip(1);
}
}
}
I get attached error.
its executing till uWarning() line. I assume its the condition statement if(l>1) is causing the issue. Please help on this regard.
I tried if(l>parseInt("1",10)
and also var l = parseInt(attributeAray.length,10)
still same error
Kind regards,
Jai