Visokio website     Downloads     Video tutorials     KnowledgeBase  
email outputs from datamanager - only when there is content - Visokio Forums
email outputs from datamanager - only when there is content
  • SteveP April 20, 2012 5:20AM
    We are running 2.7 server edition, and have set up a job to check a couple of data files for duplicate records. If any are found, we want the problem records to be emailed to somebody. We filter the data down to just the duplicate records, and then use an Email output block at the end of the datamanager. We have ticked the "autopublish" box, and left the "auto-publish empty recordsets" box empty.

    If we open the datamanager, it works - an email goes out if there is a problem, but no email goes out if the file has no duplicates.

    Then we set this job up to run under Scheduler, added a "Publish Output Blocks" task to the schedule, but now the email goes out every time, even when there are no records to send. It looks as if the Scheduler task is ignoring the option to NOT publish empty recordsets.

    Is there another way to do this with Scheduler?
  • 2 Comments
  •     chris April 20, 2012 5:34AM
    Hi,

    Thanks for the question.

    The auto-publish settings are only used when you have a DataManager workspace open. They are not applied in the scheduler. Instead you should probably use a "Validate data" operation immediately above the publisher block.

    The "Validate data" operation can be used to throw an error when certain conditions are met. This will stop any downstream publishers executing. In this case we want to ensure that the input data has at least one row.

    In the "Validate data" block select the "Custom" validation and enter the formula "ALLRECORDCOUNT>0". If you click "Tools > Error conditions..." you should see that custom validation will throw an error if it fails. The scheduler will now not publish empty recordsets.
  • SteveP April 20, 2012 7:01AM
    Thanks - that seems to have solved it.

    Steve

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership