Search found 90 matches
- Fri Sep 08, 2023 1:40 pm
- Forum: Node.js scripting
- Topic: Versioning scripts & Builds
- Replies: 7
- Views: 19765
Re: Versioning scripts & Builds
Since my last comment above, we've made a couple of changes: after Switch upgrades, the performance of script folders is mostly on par with packaged scripts so we are using script folders exclusively to be able to update scripts without restarting flows (naturally only if there are no changes to .s...
- Fri Sep 08, 2023 1:06 pm
- Forum: Node.js scripting
- Topic: Logging of variable
- Replies: 6
- Views: 19773
Re: Logging of variable
Hi, This is due to Switch reading the %2 from your string and interpreting that the log message includes a placeholder (%1, %2 etc) to replace like you could use it await jog.log(LogLevel.Info, 'Message about %1',[jobName]); <–– here the %1 is replaced with jobName variable. So you can get around th...
- Tue Mar 07, 2023 10:24 am
- Forum: Flows
- Topic: URL to a single Submit Point - Switch Web Services [SOLVED]
- Replies: 2
- Views: 2495
Re: URL to a single Submit Point - Switch Web Services
Go to web portal –> Submit Jobs –> three dots in top left –> Manage Submit Points –> New URL and you can choose if it uses authentication or not.
- Mon Feb 13, 2023 1:30 pm
- Forum: Flows
- Topic: Archive hierarchy (offline paths)
- Replies: 7
- Views: 7068
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 ...
- Mon Feb 13, 2023 9:24 am
- Forum: Flows
- Topic: Archive hierarchy (offline paths)
- Replies: 7
- Views: 7068
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 t...
- Tue Jan 31, 2023 1:29 pm
- Forum: Flows
- Topic: Filter by file size
- Replies: 3
- Views: 3451
Re: Filter by file size
You can use the [Job.ByteCount] variable in a condition with variables so you have to convert MB to Bytes first (100 MB = 104875600 bytes):


- Thu Mar 31, 2022 9:50 am
- Forum: Flows
- Topic: Scheduled Flow Backup
- Replies: 6
- Views: 5752
Re: Scheduled Flow Backup
I ended up spending a lot of time a few years ago writing scripts for our version of switch-flow-auto-backup to create all the property sets folders and inject the required files for each flow into them. Since doing that we've been able to replicate what happens when you export flows manually Inter...
- Thu Mar 31, 2022 9:41 am
- Forum: Flows
- Topic: Scheduled Flow Backup
- Replies: 6
- Views: 5752
Re: Scheduled Flow Backup
Either this app auto-save-plus or these flows github.com/open-automation/switch-flow-auto-backup can handle backing up flows. We use the latter with some custom scripts added to back up to AWS S3 every week We also use a modified version of that switch-flow-auto-backup flows, but unfortunately the ...
- Sat Mar 12, 2022 6:11 am
- Forum: Node.js scripting
- Topic: job.log function doesn't run
- Replies: 6
- Views: 7602
Re: job.log function doesn't run
Oh, ok, yes that might be it. Can you log in the beginning of checkGs(), before Sheets.spreadsheets.values.get()? Have you tried running the script in debug mode ( https://www.enfocus.com/manuals/DeveloperGuide/SW/21.1/home.html#en-us/common/swscr/concept/co_swscr_nodejsscript_debugging.html ) so th...
- Fri Mar 11, 2022 11:01 pm
- Forum: Node.js scripting
- Topic: job.log function doesn't run
- Replies: 6
- Views: 7602
Re: job.log function doesn't run
Hi,
You should use await:
and earlier, before 2020 Fall, the parameter array was required so it should be included if you're using an older Switch:
I hope it helps.
You should use await:
Code: Select all
await job.log(LogLevel.Warning, 'Found in inventory')
Code: Select all
await job.log(LogLevel.Warning, 'Found in inventory', [])
- Thu Feb 10, 2022 9:57 pm
- Forum: Flows
- Topic: Inject Wildcard without Regex search?
- Replies: 2
- Views: 2654
Re: Inject Wildcard without Regex search?
But when this happens the incoming file is sent to Problem Jobs (and sends a generic Switch administrator alert email, which I would like to avoid ). If this is your only problem with Inject job, what if you just change the "Send alerts to" property of the flow's Problem Job folder to 'No...
- Mon Jan 31, 2022 12:55 pm
- Forum: Node.js scripting
- Topic: Typescript compile error in index.d.ts
- Replies: 8
- Views: 11194
Re: Typescript compile error in index.d.ts
OK well that sounds like a bug then – could you file a support case via Enfocus Customer Portal?
--patrik
--patrik
- Mon Jan 31, 2022 10:24 am
- Forum: Node.js scripting
- Topic: Typescript compile error in index.d.ts
- Replies: 8
- Views: 11194
Re: Typescript compile error in index.d.ts
I haven't encountered exactly that, but the line numbering in your index.d.ts doesn't match mine so what version of types-switch-scripting are you including in your project? When you create a new script folder with Switch 2021 Fall, the line in its package.json is: "@types/switch-scripting"...
- Tue Dec 07, 2021 1:38 pm
- Forum: Flows
- Topic: Send email if failed to Inject job?
- Replies: 2
- Views: 3040
Re: Send email if failed to Inject job?
Hi, have you tried the new Inject Wildcard app instead: https://www.enfocus.com/en/appstore/product/inject-wildcard or older Inject Lite to assert if file exists before trying to inject: https://www.enfocus.com/en/appstore/product/inject-lite Both of those have error connections you could use to tri...
- Tue Nov 02, 2021 7:52 am
- Forum: Flows
- Topic: Single Line Text with Variables
- Replies: 7
- Views: 8377
Re: Single Line Text with Variables
Latecomer to this party, but surely 'After_' is the easiest solution (assuming your naming structure is consistent) Actually that doesn't work because as it states in the documentation, "After" extracts “The substring after (and not including) the last occurrence of the search string” so ...