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


mark61
2018-10-16T08:47:02Z
How do I disable the date/time being shown in the output of a task? I just need the actual output.
As in the attached I only want the value 4832763 as in my next task I will use this to populate a database with the value

output.PNG
Sponsor
Forum information
Gary_W
2018-10-16T14:06:48Z
What's the RDBMS and the query? You should eliminate the date and time there. In the meantime, you could always just grab the last string of digits with a regular expression (in case the output is out of your control for some reason), but I reiterate, this is sloppy and the real answer is to output the correct format in the first place:

{REGEX(Replace|{TASK(PrevTask|StdOut)}|.*\s+(\d+)$|$1)}

The regular expression explained:
.* - match 0 or more any character
\s+ - followed by 1 or more whitespace characters
(\d+) - followed by a remembered group of 1 or more digits
$ - anchored to the end of the line

$1 is the replacement which is the first remembered group or in this example the string of digits at the end.
mark61
2018-10-16T14:14:58Z
The SQL output is correct. It just seem VisualCron is adding the date/time back afterwards. Unless I'm going mad I'm sure it never used to which makes me think it's a setting somewhere.
Gary_W
2018-10-16T14:40:10Z
Can't say I've seen that. We're running client 8.3.5 against Oracle 12. Are your queries from text in VC, stored procedures or read in from a file? Need more info.
thordw
2018-10-17T06:00:45Z
If you don't want to mess with regex, you can use the following function

(If you're using the standard settings for SQL task output it uses tab.)
{STRING(GetColumn|1|3| |{TASK(PrevTask,StdOut)})}

Should always give you the value in column 3
Scroll to Top