on 10-03-2014 2:47 PM
You need to say IF args.error_code - don't forget the "args." part!
Steve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ahhhhh... what a relief .... I've been going around that circle for about an hour ... thanks a lot Steve .... I can now walk towards the weekend in a trouble free state of mind
Curios that you can write out variables without reference to the 'args' but must test them with?
Anyway - once again many thanks.
I notice once again I can't mark this a 'correct' - I must be raising these threads the wrong way or something, some I can say correct to and others not?
All the best.
Patrick.
PS. Have a good weekend.
Hmmm .. so if I want to slice a variable that I have established in my script (let's call it 'msg' and it contains a value of '1234abcd') to pick up the two characters starting with the 4 (i.e. 4a) what would the jt look like ..
var startpnt = msg.indexof("4");
var mychar = msg.slice(startpnt,2);
OR
args.startpnt = args.msg.indexof("4");
args.mychar = args.msg.slice(args.startpnt,2);
I assumed it would be the second but I'm getting an error?
Regards.
P.
The second looks right. If the "startpnt" variable is only needed to construct mychar, and isn't needed outside of this Javascript action, it doesn't need to go inside args, but putting it there doesn't do any harm. Think of "args" as the environment for the whole script, while anything created as a local variable exists only within in this one Javascript action.
What error are you getting?
Try building it up a step at a time. Start with "args.mychar = args.msg", then "args.mychar = args.msg.slice(4,2)" and so on. There's no easy way to debug this stuff, I'm afraid...
Steve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.