Hi All,
I have requirement where I need to send an email based on the record count of the file. If record count is 2 then I need to send an email...I am using below routine for word count of the file...While testing the routine the output is 2 but when I am using this routine in the sequencer with trigger return value=2, for the trigger link to email notification....it is not working...
If so in the job properties uncheck the option "Automatically handle activities that fail"
When a routine returns anything other than 0, DS thinks it is a return code other than 0 so it thinks the routine has aborted. When you are using routines to return values you need to code your own error handling and turn of the automatic stuff.
If you already have the set correctly but the link is not being entered can you post your condition statement.
Output from DSExecute is a dynamic array, so there's more than just your 'line count' there even though you can't see it. You need to remove it before you make your comparison. Try making this change to your routine:
One of the two should fix you up. Remove the 'ReturnValue=Ans' line (if it is an actual lline of code) as it's not needed. Once you have the routine working, everything Nick said will come into play in your Sequence job with the Routine Activity stage.
-craig
"You can never have too many knives" -- Logan Nine Fingers