Search found 645 matches

by gabrielp
Tue Dec 03, 2019 5:24 pm
Forum: LEGACY scripting
Topic: Call function ONE time if I have two incoming files?
Replies: 7
Views: 2038

Re: Call function ONE time if I have two incoming files?

Do you not have the metadata module? XML pickup seems like an easier approach.
by gabrielp
Tue Dec 03, 2019 5:23 pm
Forum: LEGACY scripting
Topic: Call function ONE time if I have two incoming files?
Replies: 7
Views: 2038

Re: Call function ONE time if I have two incoming files?

How do get information of the files inside the folder. Ex if I want to get the size in a XML? sense the xml-file is in a folder I can't use this to get the size in var xmlWidth. var theXML = new Document(job.getPath()); var xmlWidth = theXML.evalToString("//PrintWidthCover"); I don't have Switch an...
by gabrielp
Tue Dec 03, 2019 2:59 pm
Forum: LEGACY scripting
Topic: Call function ONE time if I have two incoming files?
Replies: 7
Views: 2038

Re: Call function ONE time if I have two incoming files?

I think there's more than a few ways to handle this. Here are a couple of ideas: you could consume the XML as a dataset and attach it to the PDF with a metadata pickup. Then, you could send in the PDF and access the XML as a dataset within scripter. Another option would be to hold and assemble to pu...
by gabrielp
Mon Nov 25, 2019 7:47 pm
Forum: LEGACY scripting
Topic: Using JS To Add Email Addresses
Replies: 6
Views: 2153

Re: Using JS To Add Email Addresses

What does `mgrName` log as? tag='Salesperson/CSA']/value" Perhaps this slash is causing problems. You'll have to do some debugging to see if the dataset is there and why the xpath isn't returning the right thing. Honestly, I wouldn't even do this metadata lookup and selection within the script. It m...
by gabrielp
Fri Nov 15, 2019 6:51 pm
Forum: Switch
Topic: Portals failing after update to 4.0
Replies: 10
Views: 4338

Re: Portals failing after update to 4.0

Finally we took over the maintenance of Portal app :? the appstore is still not up to date for the new repo for the portal support Here is the new link : https://bitbucket.org/sobookhub2/switch-portal. Instead of forking the project entirely, could you make contributions to https://github.com/open-...
by gabrielp
Tue Oct 29, 2019 6:25 pm
Forum: LEGACY scripting
Topic: Java "Includes" Not Working
Replies: 2
Views: 1073

Re: Java "Includes" Not Working

Take my comments with a grain of salt because I don't have access to Switch Scripter any longer. 1) You have an extra space before you invoke the .includes method if (jobName.includes ("PORTFL")) { job.setJobState("PORTFL"); } should be if (jobName.includes("PORTFL")) { job.setJobState("PORTFL"); } ...
by gabrielp
Fri Oct 25, 2019 4:48 pm
Forum: Flows
Topic: Use headers or separations/parts in a flow?
Replies: 4
Views: 1556

Re: Use headers or separations/parts in a flow?

And a more direct answer to your question, I used to draw divisions in flows by using two folders with a colored connector. A little silly but it worked...

Image
by gabrielp
Fri Oct 25, 2019 4:46 pm
Forum: Flows
Topic: Use headers or separations/parts in a flow?
Replies: 4
Views: 1556

Re: Use headers or separations/parts in a flow?

I get the use case but I think there is value in splitting those into different flows in a single folder. They'll get revisioned differently, can be stopped and started independently, and will produce logs that are easier to understand where issues are occurring. If you do have common stuff (like ha...
by gabrielp
Fri Jun 28, 2019 3:12 pm
Forum: Flows
Topic: Flow Auto Backup
Replies: 7
Views: 6161

Re: Flow Auto Backup

Hey Dave, Try remaking the portals with the latest version of the scripts or the Portals app from the app store. It may be a bit tedious but if you bring in new configurators and configure them manually you can be sure that nothing is corrupt. I bet one problem is that the versions of the Portals sc...
by gabrielp
Thu May 16, 2019 10:27 pm
Forum: Switch
Topic: USPS mail processing
Replies: 2
Views: 1569

Re: USPS mail processing

Dwight from Apago has done some custom integrations with AccuZIP before. I used to use BCC to automate and clean mail lists using Switch. Probably not a huge help but I found it pretty helpful to preflight databases out of Switch, which can be done with a tool like this https://github.com/shawmut/da...
by gabrielp
Thu May 02, 2019 6:25 pm
Forum: Flows
Topic: Insert different logos
Replies: 6
Views: 2877

Re: Insert different logos

I already created the solution using Switch and Pitstop ;) The logos are converted to PDF. The 16 page PDF is injected and the two files are merged with the logo as page 1. An action in Pitstop will select page 1 and scale it to the desired size. The action then cuts page one and paste the content ...
by gabrielp
Thu May 02, 2019 6:22 pm
Forum: LEGACY scripting
Topic: Job Creation in webhookTriggered() - File Does Not Exists...
Replies: 2
Views: 1481

Re: Job Creation in webhookTriggered() - File Does Not Exists...

Honestly Pat, what you have in the second example looks correct to me. It's what I've done in scripts before: https://github.com/open-automation/switch-dummy-job-clock/blob/master/src/DummyJobClock.js#L42-L51 The only thing I'd add is set the "createFolder" argument: var logPath = job.createPathWith...
by gabrielp
Thu May 02, 2019 6:11 pm
Forum: Applications
Topic: Optical recognition character
Replies: 3
Views: 2135

Re: Optical recognition character

Assuming its an image and you need OCR to read the characters -- I don't know of any OCR software currently integrated with Switch -- but maybe someone out there has done it. But there are a lot of cloud OCR services (I know AWS and Google Cloud have one). You could use the HTTP configurator or a sc...
by gabrielp
Wed May 01, 2019 5:52 pm
Forum: Flows
Topic: Insert different logos
Replies: 6
Views: 2877

Re: Insert different logos

Sounds like a small variable data job. In my world I would have done this with HP SmartStream or whatever -- built a little spreadsheet with the logo names for each variant and built the file that way.