Hello,
I'm not very used to scripting in Switch, so I probably made a mistake in my script. I want to extract the name of someone using the email address included in private data "EMAIL" and then replacing the "." with a space and reinsert it as an other private data to be used later.
If I use the script-element my job stays in the folder before the script, no error message or what so ever. It just does nothing.
This is my script:
function jobArrived( s : Switch, job : Job )
{
var Email = job.getPrivateData("EMAIL");
var Naam = Email.substring(0,Email.indexOf("@"));
Naam = Naam.replace("."," ");
job.setPrivateData("NAAM",Email);
}
Thank you very much
Bart
Simple javascript problem
Re: Simple javascript problem
You have to add an outgoing connection
job.sendToSingle() for example, it will send your file to the next folder.
job.sendToSingle() for example, it will send your file to the next folder.
-
- Member
- Posts: 31
- Joined: Thu Aug 04, 2016 4:06 pm
Re: Simple javascript problem
Thanks Jan,
This did the job!
Greetings
Bart
This did the job!
Greetings
Bart