Community forum

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


osirisja
2012-03-05T14:58:22Z
Hi Henrik

Okay - I hit a wall! 😠

I have been trying out the new Loop functionality with the Line Break character and I'm trying to create variables using the results from the SQL query:

4|1|15/02/2012 14:49:20|27/02/2012 15:30:54|1|default|v|info@mavensystems.co.uk|0|||r:\i

The Loop settings are as per the attached screenshot, and the Variable definitions are also attached as a screenshot. I am using a 'Counter' variable incremented by one for each iteration, to create the dynamic variable, but I can't seem to assign the delimited values to each variable.

Any pointers?

Cheers

Andy
osirisja attached the following image(s):
Sponsor
Forum information
Support
2012-03-05T17:01:05Z
Are the Variables created but empty?

Try using this and see if it makes any difference:

{LOOP(CurrentValueX)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
osirisja
2012-03-05T17:30:10Z
Hi Henrik

I think I found the problem. The variable to use is {LOOP(CurrentValueXArray,0)} for column 0, however, in the Loop itself, you have to use Column 1. No idea why that might be?

Cheers

Andy
Support
2012-03-05T17:44:51Z
Will check that but is {LOOP(CurrentValueX)} working?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
osirisja
2012-03-05T18:01:34Z
Hi Henrik

Yes, {LOOP(CurrentValueX)} is working

Cheers

Andy
Support
2012-03-06T07:38:36Z
I did use the Variable {LOOP(CurrentValueXArray,0)} in a File write Task and used this in the for each loop:

4|1|15/02/2012 14:49:20|27/02/2012 15:30:54|1|default|v|info@mavensystems.co.uk|0|||r:\i

This resulted in a file that looked like this:

4
1
15/02/2012 14:49:20
27/02/2012 15:30:54
1
default
v
info@mavensystems.co.uk
0
r:\i

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
osirisja
2012-03-06T12:14:38Z
Hi Henrik

Well it seems that both {LOOP(CurrentValueX)} and {LOOP(CurrentValueXArray,0)} work, and all works well.

For information I also tried with the SQL command with Include Field Names selected in the output but with this selected the Loop falls apart with some weird values defined. Not so much of an issue though and I guess there isn't an easy solution....

Thanks for adding this functionality in though.

Cheers

Andy
osirisja
2012-04-02T11:34:50Z
Hi Support

Seems like with the introduction of V6.1 the Loop functionality with the Line Break character for dynamically assigning variables has stopped working.

Cheers

Andy
Support
2012-04-02T11:38:31Z
Originally Posted by: osirisja 

Hi Support

Seems like with the introduction of V6.1 the Loop functionality with the Line Break character for dynamically assigning variables has stopped working.

Cheers

Andy



Hi Andy,

please give us more information on the Y source. What we started doing from version 6.0.9 is that we remove any trailing new line from output. This should not affect the loop though but that is the only thing I can think of.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
osirisja
2012-04-02T14:32:09Z
Hi Henrik

The data is retrieved via SQL Query with Output defined as : Field Separator: 'Pipe' Line Break: 'Pipe' (although I have tried CRLF for Line break also).

The 'Y' source is as follows (taken from STDOUT of the SQL Query task):

1|1|01/02/2012 13:37:48|21/03/2012 16:52:43|1|xxINVPDF.PRF|v|andy.payne@mavensystems.co.uk|1|na|na|USERISIS\PPDE_JT.PRF|t|na|U|2||inkh8y0o|xxINV.SET||PB/006|0|COMP\PROD\|1|U:\@SPOOL\|trigger.rdy|b2p|XXPS.CFG|C:\@VC\Trigger||XX Invoice|d|*JT*.XML|COMP\PROD\OUTPUT\|0|1|COMP\PROD\|0|1|1|1|COMP\PROD\RECON\|XXINV|COMP\PROD\CTL\|U:\DATDEV

The LOOP is a FOR EACH IN Y, use Column 1, Field Separator: 'Pipe' Line Break: 'Pipe'

Hope that is enough details?

Cheers

Andy



Support
2012-04-04T08:06:59Z
Originally Posted by: osirisja 

Hi Henrik

The data is retrieved via SQL Query with Output defined as : Field Separator: 'Pipe' Line Break: 'Pipe' (although I have tried CRLF for Line break also).

The 'Y' source is as follows (taken from STDOUT of the SQL Query task):

1|1|01/02/2012 13:37:48|21/03/2012 16:52:43|1|xxINVPDF.PRF|v|andy.payne@mavensystems.co.uk|1|na|na|USERISIS\PPDE_JT.PRF|t|na|U|2||inkh8y0o|xxINV.SET||PB/006|0|COMP\PROD\|1|U:\@SPOOL\|trigger.rdy|b2p|XXPS.CFG|C:\@VC\Trigger||XX Invoice|d|*JT*.XML|COMP\PROD\OUTPUT\|0|1|COMP\PROD\|0|1|1|1|COMP\PROD\RECON\|XXINV|COMP\PROD\CTL\|U:\DATDEV

The LOOP is a FOR EACH IN Y, use Column 1, Field Separator: 'Pipe' Line Break: 'Pipe'

Hope that is enough details?

Cheers

Andy






This works for me. What error do you get when you hard code it?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
osirisja
2012-04-04T08:39:08Z
Hi Henrik

Ooops - my bad! I just checked the task and for some reason the SET VARIABLE task had been changed by me!

All working properly now - Sorry for the confusion

Cheers

Andy
Support
2012-04-04T08:40:46Z
No problem!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Users browsing this topic
Scroll to Top