Search found 572 matches

by freddyp
Thu Nov 19, 2020 1:01 pm
Forum: Node.js scripting
Topic: Fill excel table with data. Data not appearing
Replies: 10
Views: 3163

Re: Fill excel table with data. Data not appearing

I tried it out with some fixed values for asd and xyz to reduce setup time and it worked. console.log is not going to show anything in the Switch messages! Make that: await job.log(LogLevel.Error, e.message); and you will get a (hopefully) clear error message. The first time I ran it I got the error...
by freddyp
Wed Nov 18, 2020 10:07 am
Forum: Node.js scripting
Topic: Fill excel table with data. Data not appearing
Replies: 10
Views: 3163

Re: Fill excel table with data. Data not appearing

I have not tested this but there is something that is not OK in these three lines of code: let workbook = new ExcelJS.Workbook(); workbook = await workbook.xlsx.readFile(filePath); // script jumps from this line to await job.sendToNull(); let worksheet = workbook.getWorksheet(1); // these lines are ...
by freddyp
Fri Nov 13, 2020 4:19 pm
Forum: Flows
Topic: Hold function
Replies: 3
Views: 908

Re: Hold function

You guessed right :)

I suggest you give it a try on Tinder for Apps as we sometimes call it: https://www.enfocus.com/en/appstore/appmatch. Good luck :lol:
by freddyp
Thu Nov 12, 2020 8:46 am
Forum: Flows
Topic: Webhook
Replies: 3
Views: 658

Re: Webhook

Describe the failure in the order system. It is not necessarily a network setup problem. Just browsing to the URL also does not say everything because that uses a GET. Submitting web hooks is usually done through POST. In order to test the network setup in a reliable way, my advice is to use a tool ...
by freddyp
Tue Nov 10, 2020 6:49 pm
Forum: Flows
Topic: Sort Job Name Proper
Replies: 4
Views: 813

Re: Sort Job Name Proper

Let me add something, just for the sake of education, because the approach Laurent described is much better in this case. Your idea to use "Sort files in job" was essentially correct. If you had defined "Sort key 1" as "Number" and the "Number index" as 2, then all the files in the folder would have...
by freddyp
Tue Nov 10, 2020 10:45 am
Forum: Flows
Topic: Calculate amount
Replies: 5
Views: 868

Re: Calculate amount

I have 8 to 10 dummy-files coming in from different Submit Points, that submits data only. You submit dummy files, probably to submit metadata, and not data only, correct? In that case, know that you can also define a submit point as submitting metadata only. Switch will then create an empty text f...
by freddyp
Mon Nov 09, 2020 11:25 am
Forum: Node.js scripting
Topic: Fill excel table with data. Data not appearing
Replies: 10
Views: 3163

Re: Fill excel table with data. Data not appearing

You can ignore the map message. Debugging always stops there. Note that the script that is running is a cached version of your original. This implies that any breakpoints you may have set on the original main.js are not recognized. Stopping here means you can set your breakpoints on that cached vers...
by freddyp
Fri Oct 30, 2020 5:38 pm
Forum: LEGACY scripting
Topic: Replace comma with a dot
Replies: 7
Views: 1204

Re: Replace comma with a dot

This is something you can do directly in the XPath with which you get the info from the XML using an XPath function:
Screen Shot 2020-10-30 at 15.35.00.png
Screen Shot 2020-10-30 at 15.35.00.png (76.96 KiB) Viewed 1196 times
The XPath expression is perhaps not so readable in the image:

Code: Select all

translate(//productsize,',','.')
by freddyp
Fri Oct 30, 2020 1:18 pm
Forum: Flows
Topic: Dummy Job Clock
Replies: 6
Views: 1727

Re: Dummy Job Clock

Why don't you simply use the time constraints of the flow? The flow will not run between the times you specify so Dummy Job Clock will not be creating files. Or is that too easy?
by freddyp
Fri Oct 30, 2020 10:46 am
Forum: Flows
Topic: Measure time completed for process per file
Replies: 1
Views: 445

Re: Measure time completed for process per file

"Hold job" with the "Folder constraint" property set to "Yes" on the outgoing connection. "Maximum job count" should be 1 of course.
by freddyp
Tue Oct 27, 2020 5:47 pm
Forum: Node.js scripting
Topic: number and validating property
Replies: 1
Views: 538

Re: number and validating property

The behavior you describe has always been like that. If you want to allow negative number and/or floats during flow design (that is different than at execution time ), you should choose "Single-line text" in combination with "Validation - Custom". In the entry point isPropertyValid (legacy) or in va...
by freddyp
Mon Oct 26, 2020 3:24 pm
Forum: LEGACY scripting
Topic: Split PDF with script expression
Replies: 2
Views: 652

Re: Split PDF with script expression

You do not need a script expression for that: [Switch.Calculation:Expression="[Stats.NumberOfPages] / [Job.NameProper:After="Copies"]"] for the "Pages per file" property should do it. However, you probably also want to make sure that the number of pages of the PDF is a multiple of the number after "...
by freddyp
Fri Oct 23, 2020 3:31 pm
Forum: Node.js scripting
Topic: SOAP Request
Replies: 1
Views: 897

Re: SOAP Request

USE PROMISES!

During the advanced webinar session (there is on Nov. 17th at 9am and one on Nov. 19th at 4pm) I will explain in a bit more detail why you should use promises instead of callbacks, and offer a strategy or two on how to cope with that.
by freddyp
Tue Oct 13, 2020 6:07 pm
Forum: Flows
Topic: Execute Command SSH
Replies: 8
Views: 1468

Re: Execute Command SSH

You should let the property "Command or path" of "Execute command" point to a shell script instead of to ssh itself. Do not forget to chmod +x the shell script!
by freddyp
Thu Oct 08, 2020 2:28 pm
Forum: Applications
Topic: Communication Switch - Photoshop interrupted
Replies: 3
Views: 1173

Re: Communication Switch - Photoshop interrupted

This is not something I am familiar with, so I cannot help you but let me ask you this: what is it that you are doing with the files in Photoshop? Depending on your answer my advice may be not to use Photoshop at all, but to use a much more efficient approach.