Search found 103 matches
- Tue Feb 03, 2026 5:06 pm
- Forum: Node.js scripting
- Topic: class PdfDocument in Switch 25.11
- Replies: 7
- Views: 1584
Re: class PdfDocument in Switch 25.11
I ran into the same issue and was able to resolve it by explicitly prefixing the enum with "EnfocusSwitch." For example: const jobPath = await job.get(EnfocusSwitch.AccessLevel.ReadWrite); After adding the prefix, the code worked as expected. Next, I will experiment further with the ES mod...
- Mon May 26, 2025 7:31 am
- Forum: PDF Creation
- Topic: Adding Blanks to Odd Page Counts
- Replies: 4
- Views: 106332
Re: Adding Blanks to Odd Page Counts
Hi,
I think there is an easier solution.
Set the action "Add pages" to add "Until a multiple of 2"

I think there is an easier solution.
Set the action "Add pages" to add "Until a multiple of 2"

- Thu Apr 17, 2025 7:49 am
- Forum: Flows
- Topic: Socket Hangup error
- Replies: 3
- Views: 19590
Re: Socket Hangup error
Hi Sander, Good to know that I'm not alone on this one... ;) But I already knew :D Version 15 runs stable, but it doesn't have all the features like 20.3. Since the request (with 20.3) usually succeeds, it is not always an option to retry, since that may result in jobs being sent twice to production...
- Wed Apr 02, 2025 6:52 am
- Forum: Flows
- Topic: Socket Hangup error
- Replies: 3
- Views: 19590
Re: Socket Hangup error
@RobertHumphrey: If you can afford to lose some functionality, you can downgrade to version 15. That version seems to work fine. Read the docs carefully to know what you will be missing.
- Tue Mar 25, 2025 8:28 pm
- Forum: Flows
- Topic: Socket Hangup error
- Replies: 3
- Views: 19590
Socket Hangup error
Hi, Every day, I experience Socket Hangup errors in Switch 2024 Fall. This occurs primarily, but not exclusively, in the HTTP request module (version 20.3). However, the issue does not seem to lie in the request itself but rather in writing metadata after the request has been completed. I base this ...
- Wed Oct 16, 2024 4:27 pm
- Forum: Flows
- Topic: Variable or default value
- Replies: 2
- Views: 5915
Re: Variable or default value
Hi, I think this is quite simple and even possible in the configuration of the submit-point ;) Add a second child-field that is triggered by the "No" value of the parent. Set the default value for this field. Then set "Display metadata filed" to "No" Now you will always...
- Wed Oct 02, 2024 9:14 am
- Forum: Flows
- Topic: Calculate Sum of Values with XML
- Replies: 3
- Views: 10359
Re: Calculate Sum of Values with XML
Hi
If you want to use the metadata, then you can also use an xpath expression to calculate the sum.
Note: the type must be a Integer or Rational
[Metadata.Integer:Dataset="Xml",Model="XML",Path="sum(//No-Up)"]
Robert
If you want to use the metadata, then you can also use an xpath expression to calculate the sum.
Note: the type must be a Integer or Rational
[Metadata.Integer:Dataset="Xml",Model="XML",Path="sum(//No-Up)"]
Robert
- Tue Jul 30, 2024 7:05 am
- Forum: Flows
- Topic: Archive Hierarchy UNC link error
- Replies: 3
- Views: 7825
Re: Archive Hierarchy UNC link error
You should use forward slashes, even while Windows uses bask slash.
So: //myshare/some/path is okay to use in Switch. Switch will translate it in the background
So: //myshare/some/path is okay to use in Switch. Switch will translate it in the background
- Wed Jun 26, 2024 3:03 pm
- Forum: Flows
- Topic: Trigger Application Cleanup
- Replies: 8
- Views: 9760
Re: Trigger Application Cleanup
Following...
- Wed May 01, 2024 4:53 pm
- Forum: Flows
- Topic: Compose XML for HTTP POST using file in hot folder
- Replies: 50
- Views: 64610
Re: Compose XML for HTTP POST using file in hot folder
Hi teetomterrific, I think this should work. (Not tested) 1) Very easy with Switch :-) 2) Use this variable [Job.NameProper:Before="_"] and store it in private data 3) Use this variable [Job.NameProper:Search="\d{1}(?=-)"] and store it in private data 4) Compose the XML with the ...
- Mon Mar 04, 2024 2:26 pm
- Forum: Flows
- Topic: EMFILE: too many open files ..main.js
- Replies: 26
- Views: 66771
Re: EMFILE: too many open files ..main.js
@davyverstaen:
Could you provide a piece of sample code on how to create, open, and close tmp files?
So we have some kind of "recommended" way of working with tmp-files.
Robert
Could you provide a piece of sample code on how to create, open, and close tmp files?
So we have some kind of "recommended" way of working with tmp-files.
Robert
- Mon Mar 04, 2024 11:43 am
- Forum: Flows
- Topic: EMFILE: too many open files ..main.js
- Replies: 26
- Views: 66771
Re: EMFILE: too many open files ..main.js
@JimmyHartington: found this on StackOverflow about the ECONNRESET error. "ECONNRESET" means the other side of the TCP conversation abruptly closed its end of the connection. This is most probably due to one or more application protocol errors. You could look at the API server logs to see ...
- Mon Mar 04, 2024 8:20 am
- Forum: Node.js scripting
- Topic: Script Expression and set action list
- Replies: 4
- Views: 12133
Re: Script Expression and set action list
Hi Jimmy, I agree that job.getVariableAsString etc should be available in the node.js script-expressions. It would make migrating from legacy to node.js script-expressions much easier. But... The Enfocus Scripting docs provide a function getXpath() that can easily be used to get data from datasets, ...
- Mon Mar 04, 2024 7:14 am
- Forum: Flows
- Topic: EMFILE: too many open files ..main.js
- Replies: 26
- Views: 66771
Re: EMFILE: too many open files ..main.js
Hi Magnus, I've had these errors also. These were caused by scripts that created tmp-files that the script did not properly clean up. Rebooting the whole system helped me get Switch running again, but after a while, the errors reappeared. So check you're script(s) for unclosed (tmp) files. Another s...
- Mon Feb 12, 2024 4:21 pm
- Forum: Flows
- Topic: HTTP POST a body
- Replies: 6
- Views: 6728
Re: HTTP POST a body
I use the HTTP Post as follows:


- Incoming job is the json-body to send
- Property "Attached file" references this as in the screenshots

