Search found 103 matches

by cstevens
Wed Jul 11, 2018 6:40 pm
Forum: Applications
Topic: HP Smartstream error - "Registration code is invalid"
Replies: 2
Views: 6202

Re: HP Smartstream error - "Registration code is invalid"

I spoke to the configurator developer about this. Apparently this is some kind of timing issue with the link to InDesign. The application needs to be up and running before files are run through the configurator. This shouldn't happen if InDesign is running when files are sent through the flow. If yo...
by cstevens
Thu Jun 14, 2018 11:12 pm
Forum: Flows
Topic: Dynamic property 'copies' has invalid value
Replies: 1
Views: 3085

Re: Dynamic property 'copies' has invalid value

This normally happens when you're using single line text with variable or script expression that isn't resolving to a positive integer value. What do you have set for that property?
by cstevens
Thu Apr 26, 2018 5:04 pm
Forum: LEGACY scripting
Topic: Regex Help
Replies: 13
Views: 19809

Re: Regex Help

I didn't know you could combine segment and RegEx like that. Thank you for sharing.
by cstevens
Tue Apr 24, 2018 8:40 pm
Forum: LEGACY scripting
Topic: Regex Help
Replies: 13
Views: 19809

Re: Regex Help

I got this to work in an online RegEx testing tool: /(?<=-)[\d\w\s]*(?=-V\d{2})/ but javascript/Switch doesn't support lookbehinds. If you leave the lookbehind off: /[\d\w\s]*(?=-V\d{2})/ it still works, but only because the '-' character is not a digit/alpha/whitespace character. Not sure how relia...
by cstevens
Mon Apr 23, 2018 11:02 pm
Forum: Flows
Topic: XML pickup tool
Replies: 11
Views: 17904

Re: XML pickup tool

You sure that PO# is unique in the XML file? If it points to multiple nodes then you'll get that error.

What happens if you define the first node like this:

Code: Select all

//field-list/field[tag="PO#"][1]/value
by cstevens
Mon Apr 23, 2018 10:23 pm
Forum: Flows
Topic: XML pickup tool
Replies: 11
Views: 17904

Re: XML pickup tool

Using a double slash in an XPath means to start at the beginning of the document. If you're doing that then you need to include the field-list element ( [Metadata.Text:Path="//field-list/field[tag='CustomerID']/value",Dataset="Xml",Model="XML"] Also Switch's path builde...
by cstevens
Thu Apr 19, 2018 6:26 pm
Forum: LEGACY scripting
Topic: Regex Help
Replies: 13
Views: 19809

Re: Regex Help

Are you trying to get COMPANY or Additional Info?

Segment starts at the beginning of the name, so as long as the first section is consistent company should always start at 9.
by cstevens
Thu Apr 19, 2018 5:09 pm
Forum: LEGACY scripting
Topic: Regex Help
Replies: 13
Views: 19809

Re: Regex Help

Also, you posted this under the scripting forum. If you have the ability to use scripting then :

Code: Select all

var company = job.getName().split('-')[1];
by cstevens
Thu Apr 19, 2018 4:52 pm
Forum: LEGACY scripting
Topic: Regex Help
Replies: 13
Views: 19809

Re: Regex Help

Would

/([A-Za-z]){7}/

work? That would just match the first string of 7 letters.
by cstevens
Tue Apr 17, 2018 5:39 pm
Forum: LEGACY scripting
Topic: How to add 2 days to Date in xml content- in Switch Scriptor
Replies: 8
Views: 14581

Re: How to add 2 days to Date in xml content- in Switch Scriptor

Changing the file name string is easy: var fileName = job.getName() fileName = fileName.replace(/vutek/, "ticket"); regular expressions are very handy if you've never used them before btw. If you're trying to change the name of the job in Switch and maintain the metadata which contains the...
by cstevens
Fri Apr 13, 2018 4:27 pm
Forum: LEGACY scripting
Topic: How to add 2 days to Date in xml content- in Switch Scriptor
Replies: 8
Views: 14581

Re: How to add 2 days to Date in xml content- in Switch Scriptor

Your date isn't in an ISO 8601 timestamp format, so it's not something Switch will be able to parse by default. You'll either need to handle it as a string and parse the day section out then add 2 using some logic, or convert your format into Date format, add the 2 days, then convert that timestamp ...
by cstevens
Wed Apr 11, 2018 10:25 pm
Forum: LEGACY scripting
Topic: Syntax Error
Replies: 5
Views: 10783

Re: Syntax Error

FileStatistics are normally used for getting properties of a PDL file like number of pages, trim size etc. I think you want the embedded data set var dataset = job.getDataset("NYCM-Sort-Submit-All"); Then you can use evalToString to get the value you want out of the XML: var checkPath = da...
by cstevens
Fri Mar 16, 2018 10:29 pm
Forum: Flows
Topic: Settings for Unique id?
Replies: 2
Views: 5184

Re: Settings for Unique id?

Switch will remove the unique ID from the file name in the last folder of any flow as long as the Strip unique name property is set to yes. You can terminate your flow at the point where XMF picks it up and start a new flow where it returns to Switch. If you're worrying about file name conflicts swi...
by cstevens
Wed Feb 28, 2018 7:29 pm
Forum: LEGACY scripting
Topic: Check XML using xpath or script?
Replies: 4
Views: 6511

Re: Check XML using xpath or script?

I'm not sure if you can use conditions with variables for XPaths that resolve to multiple nodes. The XPath you're looking for is probably something like this: /Root/IPN/CustomerProducts/Products[ProductComponents/@PageCount='0']/@ProductName where you would compare the string result not equal to &qu...
by cstevens
Wed Feb 21, 2018 5:17 pm
Forum: LEGACY scripting
Topic: How to replace an xml value
Replies: 4
Views: 6647

Re: How to replace an xml value

It also looks like your script doesn't have a proper entry point function. It should be wrapped like this:

Code: Select all

function jobArrived( s : Switch, job : Job )
{
}
or if using a timer this:

Code: Select all

function timerFired( s : Switch )
{
}