send modified result set as attached csv file

Last post 01-27-2016, 11:22 AM by Kay. 2 replies.
Sort Posts: Previous Next
  • send modified result set as attached csv file
    Posted: 01-26-2016, 7:35 AM
    • Kay is not online. Last active: 2019-05-03, 5:32 AM Kay
    • Top 500 Contributor
    • Joined on 10-28-2013
    • Essen
    • Novice
    • Points 87

    Hi,

    where I can find an example-workflow or description how to create a csv file and send this by mail?

    A workflow is running a csdb sql query. The result set will be analysed/modified by a script and send inline as html table. Instead of this inline html table I have to write the information into a csv file and send this as mail attachment.

    Regards, Kay  

  • Re: send modified result set as attached csv file
    Posted: 01-26-2016, 11:32 AM

    I've attached a demo workflow that shows how to create a Binary type which can be used as an attachment in the email activity.  Here is the relevant script which creates a Binary type:

    import workflow.types.Binary;
    Binary binary = new Binary();
    binary.setBytes(xpath:{/workflow/ResultSetToText_1/output}.getBytes());
    binary.setName("Clients.csv");
    return binary;

    Regards,
    Chris 

    Attachment: CSVEmailDemo.txt
  • Re: send modified result set as attached csv file
    Posted: 01-27-2016, 11:22 AM
    • Kay is not online. Last active: 2019-05-03, 5:32 AM Kay
    • Top 500 Contributor
    • Joined on 10-28-2013
    • Essen
    • Novice
    • Points 87

    Hi Chris,

    works, thanks!

    Where I can find stuff like this in the documentation, or the info that a resultSet is a Java vector, or how to use workflow.setVariable("variable","value") (which is currently not update the value)?

    Thanks, Kay

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy