Search found 102 matches

by r.zegwaard
Mon May 26, 2025 7:31 am
Forum: PDF Creation
Topic: Adding Blanks to Odd Page Counts
Replies: 4
Views: 102531

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"

Image
by r.zegwaard
Thu Apr 17, 2025 7:49 am
Forum: Flows
Topic: Socket Hangup error
Replies: 3
Views: 17498

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...
by r.zegwaard
Wed Apr 02, 2025 6:52 am
Forum: Flows
Topic: Socket Hangup error
Replies: 3
Views: 17498

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.
by r.zegwaard
Tue Mar 25, 2025 8:28 pm
Forum: Flows
Topic: Socket Hangup error
Replies: 3
Views: 17498

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 ...
by r.zegwaard
Wed Oct 16, 2024 4:27 pm
Forum: Flows
Topic: Variable or default value
Replies: 2
Views: 5203

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...
by r.zegwaard
Wed Oct 02, 2024 9:14 am
Forum: Flows
Topic: Calculate Sum of Values with XML
Replies: 3
Views: 8293

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)"]

jRjhbpRHRo.png
jRjhbpRHRo.png (28.22 KiB) Viewed 8281 times

Robert
by r.zegwaard
Tue Jul 30, 2024 7:05 am
Forum: Flows
Topic: Archive Hierarchy UNC link error
Replies: 3
Views: 6211

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
by r.zegwaard
Wed Jun 26, 2024 3:03 pm
Forum: Flows
Topic: Trigger Application Cleanup
Replies: 8
Views: 8411

Re: Trigger Application Cleanup

Following...
by r.zegwaard
Wed May 01, 2024 4:53 pm
Forum: Flows
Topic: Compose XML for HTTP POST using file in hot folder
Replies: 50
Views: 56171

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 ...
by r.zegwaard
Mon Mar 04, 2024 2:26 pm
Forum: Flows
Topic: EMFILE: too many open files ..main.js
Replies: 26
Views: 53254

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
by r.zegwaard
Mon Mar 04, 2024 11:43 am
Forum: Flows
Topic: EMFILE: too many open files ..main.js
Replies: 26
Views: 53254

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 ...
by r.zegwaard
Mon Mar 04, 2024 8:20 am
Forum: Node.js scripting
Topic: Script Expression and set action list
Replies: 4
Views: 11010

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, ...
by r.zegwaard
Mon Mar 04, 2024 7:14 am
Forum: Flows
Topic: EMFILE: too many open files ..main.js
Replies: 26
Views: 53254

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...
by r.zegwaard
Mon Feb 12, 2024 4:21 pm
Forum: Flows
Topic: HTTP POST a body
Replies: 6
Views: 5422

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
Image

Image
by r.zegwaard
Fri Nov 10, 2023 4:36 pm
Forum: Flows
Topic: Metadata: Add a leading zero to a single digit number
Replies: 3
Views: 8989

Re: Metadata: Add a leading zero to a single digit number

Hi Nico, This works for me (on another xml): [Metadata.Text:Dataset="BatchJdf",Model="XML",Path="substring(concat('0' , //dn:GeneralID[@IDUsage='batchQuantity']/@IDValue), 4 - string-length(//dn:GeneralID[@IDUsage='batchQuantity']/@IDValue))"] For you it would be this (...