Search found 74 matches

by cwswitch
Thu Nov 28, 2019 11:22 pm
Forum: Switch
Topic: Requested property is not defined: 'failAfter'; trying to use default value
Replies: 2
Views: 123

Re: Requested property is not defined: 'failAfter'; trying to use default value

I have a guess it is part of "release condition" part 3.4 in the release notes

I'm not using a release condition though, I'm just using the hold to delay jobs with a delay scheme or with a time of day window.
by cwswitch
Thu Nov 28, 2019 8:43 pm
Forum: Switch
Topic: Requested property is not defined: 'failAfter'; trying to use default value
Replies: 2
Views: 123

Requested property is not defined: 'failAfter'; trying to use default value

Upgraded from Switch 19 Spring to Switch 19 Fall just now, and Hold Job has a new error/feature.

How do I deal with this new message?

Code: Select all

Requested property is not defined: 'failAfter'; trying to use default value
I'm looking for a value on the element and connector but not seeing anything new.
by cwswitch
Tue Jul 30, 2019 6:56 am
Forum: Switch
Topic: Switch Messages - 'do not show'
Replies: 1
Views: 359

Switch Messages - 'do not show'

Hi,

I see I can filter to show many things on the (very nice) new Switch Messages

I'd like to not show some things - specifically not show Element: Recycle bin

Any ideas how to do this please?
by cwswitch
Fri Mar 22, 2019 10:28 pm
Forum: Scripting
Topic: passing results from a switch script into the flow
Replies: 2
Views: 858

Re: passing results from a switch script into the flow

niiiiice thanks! :D

I realize this is all in the books and I do search a lot, it's just overwhelming at times

Appreciate the tips, cheers
by cwswitch
Fri Mar 22, 2019 5:22 am
Forum: Scripting
Topic: passing results from a switch script into the flow
Replies: 2
Views: 858

passing results from a switch script into the flow

I'm really excited as I'm writing a script from scratch in Switch Scripter. In the past I had edited other people's or done small scripts inside of Switch.

My script gets me 3 useful values and I'm now ready to use those values in my flow.

I don't know how to access them!
by cwswitch
Thu Mar 14, 2019 3:21 am
Forum: Scripting
Topic: JavaScript working with an array
Replies: 6
Views: 1653

Re: JavaScript working with an array

THIS makes my life much easier. - Thanks
by cwswitch
Wed Mar 13, 2019 10:22 pm
Forum: Scripting
Topic: JavaScript working with an array
Replies: 6
Views: 1653

Re: JavaScript working with an array

Thanks for the help!

Is it possible to echo variables from a script out to somewhere to see what a script is producing?

I think I was making the array OK, but trying to echo out an array (so undefined) and not echo out a position of the array. Silly me :roll:
by cwswitch
Wed Mar 13, 2019 4:42 am
Forum: Scripting
Topic: JavaScript working with an array
Replies: 6
Views: 1653

JavaScript working with an array

Hi, I get this info info = (job.getVariableAsString('[Job.NameProper:After="(",Before=")"]')); It looks like this 10,5,10,20,10,10,20,10 I'm looking to put that info into an array and then access parts of the array So far any effort to put it into an array or access parts of that result in 'Undefine...
by cwswitch
Thu Feb 14, 2019 10:16 pm
Forum: Scripting
Topic: Looping through private data and adding to file name suffix
Replies: 2
Views: 991

Re: Looping through private data and adding to file name suffix

Holy shit

Thanks!!!

As my script was getting longer and worse, you came in with a nice tidy solution :lol:

I have so much to learn!
by cwswitch
Thu Feb 14, 2019 3:28 am
Forum: Scripting
Topic: Looping through private data and adding to file name suffix
Replies: 2
Views: 991

Looping through private data and adding to file name suffix

Hi, I have files arriving at a rename which contain private data that I want to add to the filename. The private data will be Key 01, Value 01 to Key nn, Value nn (key name and the value they hold are the same so Key 88 would be value 88 ). A job may have Keys 01 and 03, another job may have keys 04...
by cwswitch
Sun Jan 13, 2019 11:35 pm
Forum: Scripting
Topic: Pushing errors to Error out
Replies: 1
Views: 801

Pushing errors to Error out

Hello, Can I push any error in a script to the error out connector? Or must I have a try catch and the catch pushes the error the way I want? If try/catch was the way, then do I copy the problem bit of code like this? try { problem code in its entirety even if it is several lines long; } catch (e) {...
by cwswitch
Tue Jan 08, 2019 11:02 pm
Forum: Scripting
Topic: Convert a script to use Traffic Light output
Replies: 6
Views: 2000

Re: Convert a script to use Traffic Light output

Awesome thanks, you're very helpful
by cwswitch
Tue Jan 08, 2019 1:51 am
Forum: Scripting
Topic: Convert a script to use Traffic Light output
Replies: 6
Views: 2000

Re: Convert a script to use Traffic Light output

Thanks Gabriel your script appears so clean and readable, even though it is still way beyond me I can at least see how you handle your errors. I have edited the script I had as below and it seems to work in a test. I'm very scared to put it into production though as I'm so inept at scripting. OLD - ...
by cwswitch
Mon Jan 07, 2019 12:19 am
Forum: Scripting
Topic: Convert a script to use Traffic Light output
Replies: 6
Views: 2000

Re: Convert a script to use Traffic Light output

Ah brilliant, thanks.

So where the script is currently producing its error,

Code: Select all

throw new Error...;
Can I just add below

Code: Select all

sendToData(3);
by cwswitch
Sun Jan 06, 2019 11:27 pm
Forum: Scripting
Topic: Convert a script to use Traffic Light output
Replies: 6
Views: 2000

Convert a script to use Traffic Light output

This is the area of Switch I have most to learn about. I have a script made by a previous person and it can error. I think that having a traffic light output connector will help me move the problem jobs away from the good ones. The script does throw an error (something like an undefined variable or ...