Search found 80 matches
- Fri Jun 02, 2023 12:01 pm
- Forum: Node.js scripting
- Topic: Private Data not being set
- Replies: 5
- Views: 7024
Re: Private Data not being set
Ah that makes sense, I remember running into issues with UTF8 BOM whilst writing a script a few years ago. Although I can't remember now how exactly I resolved it haha
- Thu Jun 01, 2023 1:48 pm
- Forum: Node.js scripting
- Topic: Private Data not being set
- Replies: 5
- Views: 7024
Re: Private Data not being set
I've tested your script and the example file you provided and the private data looks to be set correctly?
- Mon May 15, 2023 1:23 pm
- Forum: Node.js scripting
- Topic: Unresolved Promises
- Replies: 5
- Views: 7379
Re: Unresolved Promises
It looks like it could be because you're not awaiting the tmp.withDir call? Not tested this but looks like it should be: await tmp.withDir(async o => { await Promise.all( // @ts-ignore files.map(async (file: string) => { const newPath = path.join(o.path, `${String(counter).padStart(padding, '0')}_${...
- Fri May 12, 2023 4:33 pm
- Forum: Node.js scripting
- Topic: Decent training resources for Node.js
- Replies: 1
- Views: 5828
Re: Decent training resources for Node.js
A course like that looks to cover everything and more than what you'd need to write scripts in Switch + it has a TypeScript section, so it would definitely be worth taking a course like that.
- Wed Apr 26, 2023 6:40 pm
- Forum: Flows
- Topic: Creating a list from multiple xml files
- Replies: 7
- Views: 7161
Re: Creating a list from multiple xml files
Have you got an example of the XML format?
My initial thought is that you’d need to use the Assemble job element with a custom assembly scheme so you can trigger a single email
My initial thought is that you’d need to use the Assemble job element with a custom assembly scheme so you can trigger a single email
- Mon Apr 24, 2023 10:48 am
- Forum: LEGACY scripting
- Topic: Script HELP on outgoing connection
- Replies: 3
- Views: 14277
Re: Script HELP on outgoing connection
I'd recommend using traffic light connections either that or have a single outgoing connection and set a true/false value as private data which you can evaluate further down the flow
- Thu Apr 20, 2023 4:14 pm
- Forum: LEGACY scripting
- Topic: Script HELP on outgoing connection
- Replies: 3
- Views: 14277
Re: Script HELP on outgoing connection
To send the jobs to an Outgoing connection that has a certain name you'd need to implement some logic like this: function jobArrived(s: Switch, job: Job) { var privateData = s.getPropertyValue("EntryNumber"); var compareNumber = s.getPropertyValue("CompareNumber"); var comparison...
- Wed Feb 15, 2023 8:01 pm
- Forum: Node.js scripting
- Topic: Populate dropdown list in SwitchScripter
- Replies: 6
- Views: 9233
Re: Populate dropdown list in SwitchScripter
This is an example of how you'd implement the getLibraryForProperty entry point: import * as fse from "fs-extra"; async function jobArrived(s: Switch, flowElement: FlowElement, job: Job) { await job.sendToSingle(); } async function getLibraryForProperty(s: Switch, flowElement: FlowElement,...
- Mon Feb 13, 2023 6:32 pm
- Forum: Flows
- Topic: Converting Epoch time to Date Time
- Replies: 4
- Views: 2069
Re: Converting Epoch time to Date Time
It sounds like the variable error will be coming from the square brackets around your stored procedure name Try changing the database variable to: [Database.Date:SQL="EXEC DPI_ConvertEpochTime [Job.PrivateData:Key="EpochTime"]",Connection="Tharstern",TimeZone="UTC&...
- Mon Feb 13, 2023 1:18 pm
- Forum: Flows
- Topic: Archive hierarchy (offline paths)
- Replies: 7
- Views: 2620
Re: Archive hierarchy (offline paths)
Not to my knowledge. I have requested it years ago, but haven't heard from it since… It is a problem for us, too, and we currently only have a workaround where we have a separate flow for such output folders that can be offline. This way, the main output flow can always be activated and jobs going ...
- Wed Feb 01, 2023 11:16 am
- Forum: LEGACY scripting
- Topic: empty node value in xml file
- Replies: 3
- Views: 5523
Re: empty node value in xml file
I would add a check using the hasChildNodes method before calling getFirstChild and getValue: // 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, job : Job ) { var dat...
- Thu Jan 26, 2023 2:19 pm
- Forum: LEGACY scripting
- Topic: API GET from Submit Point
- Replies: 9
- Views: 12683
Re: API GET from Submit Point
This worked fantastic. Now I need to clean the library up and get the submit point as I want it. I used the base of the script to populate other items as well. This allows the user to see the stocks prior to submitting a csv for use with Phoenix and if it's not there they can add it on the fly and ...
- Fri Jan 06, 2023 6:56 pm
- Forum: Flows
- Topic: Webhook not being received in Switch
- Replies: 8
- Views: 7030
Re: Webhook not being received in Switch
Which port and path are you sending your requests to? If you were using the now legacy version of the webhook element in your previous Switch instance and have set up brand new Switch instance then I'm guessing the latest Webhook default app has been installed. If that's the case you could either ro...
- Tue Dec 20, 2022 5:31 pm
- Forum: LEGACY scripting
- Topic: API GET from Submit Point
- Replies: 9
- Views: 12683
Re: API GET from Submit Point
This worked fantastic. Now I need to clean the library up and get the submit point as I want it. I used the base of the script to populate other items as well. This allows the user to see the stocks prior to submitting a csv for use with Phoenix and if it's not there they can add it on the fly and ...
- Tue Dec 20, 2022 4:26 pm
- Forum: Preflighting
- Topic: Check bleed
- Replies: 1
- Views: 3921
Re: Check bleed
The PitStop Pro Action Manual has some explainations of what these options do: https://www.enfocus.com/manuals/Extra/Actions/22/home.html#en-us/common/act/concept/co_check_bleed.html Optionally you can enable the Mirror margins according to page binding checkbox and set a white threshold for white (...