Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


PKnoesel-nkt
2014-03-10T12:06:44Z
Hi, since the update to versiono 7.1.3 I've got the error: "Error in argument" for the following variable: "{STRING(Right|{TASK(<taskid>,StdOut)}|10)} it was working befor (VC 7.0.6).

It seems to be an issue with a CR/LF within the StdOut Variable. The Output of StdOut has two lines.

BR.
Peter
Sponsor
Forum information
Support
2014-03-10T12:27:00Z
The problem is that you are mixing parameter separators, you need to use the same, either comma or pipe.

{STRING(Right|{TASK(<taskid>|StdOut)}|10)
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
PKnoesel-nkt
2014-03-10T12:39:39Z
Sorry, still not working. I replaced the comma by pipe {STRING(Right|{TASK(<task-id>|StdOut)}|10)} and got the same error message. I also tried to use only comma instead of the pipe, but same result. Anyway it was working in version 7.0.6

I think it has something to do with the Output of StdOut, if I try a StdOut with another task it is working.
The Ouput of StdOut are two "write-output" cmdlets from a powershell script.
This is the output: "No argument passed, export of default attributes! 2014-03-10"
First write-output: "No argument passed, export of default user attributes!" and
second write-output: "2014-03-10" from the powershell script.
Support
2014-03-10T12:51:00Z
Originally Posted by: PKnoesel-nkt 

Sorry, still not working. I replaced the comma by pipe {STRING(Right|{TASK(<task-id>|StdOut)}|10)} and got the same error message. I also tried to use only comma instead of the pipe, but same result. Anyway it was working in version 7.0.6

I think it has something to do with the Output of StdOut, if I try a StdOut with another task it is working.
The Ouput of StdOut are two "write-output" cmdlets from a powershell script.
This is the output: "No argument passed, export of default attributes! 2014-03-10"
First write-output: "No argument passed, export of default user attributes!" and
second write-output: "2014-03-10" from the powershell script.



I guess it does not have output or that wrong Id is used. We recommend that you use PrevTask as Id instead of guid so it becomes more dynamic.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
PKnoesel-nkt
2014-03-10T13:09:24Z
{STRING(Right|{TASK(PrevTask,StdOut)}|10)} results in the same error message. I've some jobs using the same Variable construct and they are still working. very strange
Support
2014-03-10T13:14:24Z
But try to write the output Variable to a file. I guess it is empty - hence the error.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
PKnoesel-nkt
2014-03-10T13:19:52Z
I added a task to the Job writing a File:

{TASK(<taskID>,StdOut)}

{STRING(Right|{TASK(<taskID>|StdOut)}|10)}

This is the content of the file:

No argument passed, export of default user attributes!
2014-03-10

Error in argument
ErikC
2014-03-10T14:39:33Z
Hi,

I think the issue here is the comma ',' in your text.
When this character is not there the funtion is working.

Henrik, bug?

Regards,
Erik
Uses Visualcron since 2006.
Support
2014-03-10T14:51:16Z
Yes, might be interesting to know what it contains exactly.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
PKnoesel-nkt
2014-03-10T15:16:05Z
Thanks ErikC thats it.
The issue is the comma in the output. I replaced it within the powershell script and it is working again.
But the script was running for over a year with the comma in the powershell script, something must be changed within the handling of variables at visual cron.

@Support: The OutPut Variable contained: "No argument passed, export of default user attributes!
2014-03-10"

As ErikC mentioned the "," is not correctly escaped within the handling of String.Right
ErikC
2014-03-11T08:29:12Z
PKnoesel-nkt wrote:

Thanks ErikC thats it.
As ErikC mentioned the "," is not correctly escaped within the handling of String.Right


Glad I could help. Something for 7.1.4 to fix.

I tried this with the use of a string user vairable. Passed the text:

No argument passed, export of default user attributes!
2014-03-10

Error in argument


And than I used the right string method on it. It worked fine if I removed the ',' comma in the text, but failed when I left the comman in there.


Regards,
Erik
Uses Visualcron since 2006.
Support
2014-03-11T09:15:12Z
We will change default split character for parameters to | instead of , for next build. Thanks for the report.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top