Search found 80 matches

by rgpepper
Wed Jan 22, 2020 9:33 pm
Forum: LEGACY scripting
Topic: Writing a Text File via (Java) Scripting
Replies: 5
Views: 11009

Writing a Text File via (Java) Scripting

I searched the existing posts, didn't find an exact fit for what I want to be able to do. I'm simply looking for a code example showing the combining of perhaps a data field from the job, and perhaps some other static custom text, and writing it to a local file (on Windows), UTF-8. So: defining the ...
by rgpepper
Mon Nov 25, 2019 10:28 pm
Forum: LEGACY scripting
Topic: Using JS To Add Email Addresses
Replies: 6
Views: 13211

Re: Using JS To Add Email Addresses

Call me a hack, I'm new to JS (worse yet, within Switch), this worked for me - a blend of observations by Gabriel. I used a previous folder in the flow to attach the field I needed as the JobState like so: '[Metadata.TextIndexed:Path="/field-list/field[6]/value",Dataset="Submit",...
by rgpepper
Mon Nov 25, 2019 5:43 pm
Forum: LEGACY scripting
Topic: Using JS To Add Email Addresses
Replies: 6
Views: 13211

Re: Using JS To Add Email Addresses

You are on the right track. The only thing you still have to do is to send the job to the output folder. In your case a single output connection will be enough, so in the properties of the script you define it as having just one output connection and the end of the jobArrived function you add: job....
by rgpepper
Tue Oct 29, 2019 6:49 pm
Forum: LEGACY scripting
Topic: Java "Includes" Not Working
Replies: 2
Views: 8099

Re: Java "Includes" Not Working

Thanks! Turns out I did have to use "IndexOf", and I'm golden!
by rgpepper
Tue Oct 29, 2019 6:00 pm
Forum: LEGACY scripting
Topic: Java "Includes" Not Working
Replies: 2
Views: 8099

Java "Includes" Not Working

What am I missing? I'm attempting to stash a piece of text in the JobState to be retrieved later by a configurator. // Is invoked each time a new job arrives in one of the input folders for the flow element. // The newly arrived job is passed as the second parameter. function jobArrived( s : Switch,...
by rgpepper
Mon Oct 14, 2019 3:48 pm
Forum: LEGACY scripting
Topic: Using JS To Add Email Addresses
Replies: 6
Views: 13211

Re: Using JS To Add Email Addresses

Thank You both Gentlemen! I knew about "It's much easier to understand what //field[tag='Gramvikt']/value is than what /field-list/field[2]/field-list/field[1]/field-list/field/field-list/field/value is... " but never having dealt with it in the context of a script and not sure how "d...
by rgpepper
Thu Oct 10, 2019 7:25 pm
Forum: LEGACY scripting
Topic: Using JS To Add Email Addresses
Replies: 6
Views: 13211

Using JS To Add Email Addresses

Rather than my spaghetti folder configuration to do this, I decided to try and conquer a script. The purpose of the script is to grab data from 1 (of several) fields submitted to a Submit Point by a Connector (XML job ticket), and use if/then's to determine which additional email address should be a...
by rgpepper
Tue Mar 26, 2019 10:09 pm
Forum: LEGACY scripting
Topic: Syntax Error
Replies: 5
Views: 10728

Re: Syntax Error

mclarke wrote: Thu Apr 12, 2018 6:57 pm I will make the change, thank you.

Enfocus doesn't really make interpreting the help file easy for beginners.
Right??! It doesn't translate well, there's a "layer"missing I'd say.
by rgpepper
Thu Jan 10, 2019 6:58 pm
Forum: Connect ALL / SEND
Topic: Using "Include File Info" = Illegal XML
Replies: 1
Views: 8881

Re: Using "Include File Info" = Illegal XML

With XML chosen as the Delivery Format in my Connector, and the "Include File Info" option checked: I had been using <xsl:value-of select="//*[tag='JobName']/value"/> in my .xsl file, and that works fine but only with *legal* XML element names (meaning it didn't work with the 2 f...
by rgpepper
Thu Jan 10, 2019 6:18 pm
Forum: Connect ALL / SEND
Topic: Using "Include File Info" = Illegal XML
Replies: 1
Views: 8881

Using "Include File Info" = Illegal XML

What I need to accomplish is really very simple, I just want to output a CSV file from the metadata submitted in a connector. And one of the pieces of data I need is the file name being submitted. I finally noticed the "Include File Info" option in ConnectALL 2018. And a basic XSLT transfo...
by rgpepper
Tue Jul 17, 2018 9:02 pm
Forum: LEGACY scripting
Topic: Switch Scripting Training
Replies: 4
Views: 10948

Re: Switch Scripting Training

gabrielp wrote: Thu Oct 29, 2015 2:59 pm For me, what always helps me to learn scripting/programming languages or concepts is to first start with a problem and tackle something new in my attempts to solve it.
Couldn't agree more. Any hints on learning the fixture panel in Switch Scripter?

Peace,

Rick
by rgpepper
Tue Jul 03, 2018 11:27 pm
Forum: Flows
Topic: Mapping Or Ignoring Optional XML Field
Replies: 2
Views: 3666

Re: Mapping Or Ignoring Optional XML Field

Actually I haven't even tried it, I *assumed* it was a no-go, guess I'll have to at least try it.
by rgpepper
Fri Jun 29, 2018 6:01 pm
Forum: Flows
Topic: Mapping Or Ignoring Optional XML Field
Replies: 2
Views: 3666

Mapping Or Ignoring Optional XML Field

I have a flow receiving ConnectALL submitted jobs where some fields may not exist depending on the options chosen in the connector. Challenge is, I want to include those optional fields in an email from Switch (when they *are* populated) - but need to not error out if they're *not* included. And the...
by rgpepper
Fri Apr 27, 2018 11:40 pm
Forum: Flows
Topic: XML pickup tool
Replies: 11
Views: 17865

Re: XML pickup tool

I will try that, thanks!
by rgpepper
Mon Apr 23, 2018 11:17 pm
Forum: Flows
Topic: XML pickup tool
Replies: 11
Views: 17865

Re: XML pickup tool

That at least highlights the opening value tag <value> for the correct node and doesn't give an error in that dialog. For testing purposes I was playing with an existing SQL call (just some place I could define a variable) and it gives this error in response to the following in the "Text with v...