Scripting 101/FAQ

Post Reply
Clive Andrews
Member
Posts: 85
Joined: Thu Jun 23, 2011 11:41 am

Scripting 101/FAQ

Post by Clive Andrews »

Is there such a thing - I'm wading my way through these posts, help files, crossroads itself - and adding a process of mucho guestimation - but TBH it's a right old game for a non programmer like me (I do have a techy mind)





....and I hate keep asking questions when I could (or should) be able to get a lot done myself...



Cheers guys!
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Scripting 101/FAQ

Post by dkelly »

I'd recommend that you download some the example flows to help get a feeling the Javascript language constructs and the Switch functions. You could adjust many of them to your needs easily.



Afterwards, it's a matter of finding the right set of Switch functions to perform the tasks you need to implement. It's the same with any development environment, C, C++, .NET, Java etc. You have to learn how to find the right information. It's not always easy.



The next step is experimentation and interaction with fellow users.



Some people choose to hire an experienced Switch consultant to implement the basic flows and then maintain/extend them themselves.





Sincerely,

Dwight Kelly

Apago, Inc.

dkelly@apago.com
EmanuelV
Newbie
Posts: 2
Joined: Sat Oct 15, 2011 3:11 pm

Scripting 101/FAQ

Post by EmanuelV »

I concur with Clive's original sentiment. For me, Javascript is not the issue, but how it is used in the designer. I've installed a sample flow with its 'script package' (whatever that means) but I'm not sure how I can use the Javascript result(s) in flow components.



If you want a specific example, I'm trying to process a file whose name is like 1234_description.pdf where 1234 is the job number. This should use a simple regular expression pattern match on the first captured value, something like /^(d+)_w+/, to retrieve the job number. No idea how I use this result to control the output root folder so my output is structured as 1234/1234_desc.pdf (+ any other files I happen to generate from the flow).



A collection of script-specific flows might help, instead of having to go searching for them.



To be fair, I'm a complete newbie so hopefully my understanding will improve with time.
mattbeals
Member
Posts: 59
Joined: Fri Oct 29, 2010 2:49 am
Location: Edmonds, WA
Contact:

Scripting 101/FAQ

Post by mattbeals »

You could start with a workflow segment like this.

http://www.mattbeals.com/misc/create_fo ... _names.zip



That should start you down the right track.
I'm just a dude. Anything I say has nothing to do with any other person or company.
Post Reply