Editing text before e-mail

Last post 08-05-2014, 8:14 AM by TSGDataProtect. 4 replies.
Sort Posts: Previous Next
  • Editing text before e-mail
    Posted: 08-04-2014, 3:22 PM

    I have created this workflow. The specifics don't really matter. The query feeds in to a qoperation, the results of which are added to a list saved as a variable in the workflow. I need to figure out a way to edit/alter the text stored in that variable (which is the output of the qoperation) before sending it in an e-mail. Any suggestions? Java appears to be the option provided but I don't know Java at all. Any help is greatly appreciated.


  • Re: Editing text before e-mail
    Posted: 08-04-2014, 5:34 PM

    Can you post an example of what you are saving in this list and what you want changed before inserting it into an email?  Also you shouldn't require the QLogin or QLogout activities here unless you are performing this qoperation on a CommCell that the workflow engine is not a member of.

  • Re: Editing text before e-mail
    Posted: 08-04-2014, 5:42 PM

    Sure. This is repeated many times, but each output looks like this :


    [QScript[GetSQLSubclientConf] CS[commservName] DB[CommServ] SP[QS_GetSQLSubclientConf] Qscript Output: Client [clientname], iDA [Q_MSSQL], Instance [CLIENTINSTANCE], Backupset [], Subclient [default]. Database -------- master model msdb Qscript Execution Succeeded!


    I would like the final output to show

    Client [clientname] and any text that appears AFTER msdb but BEFORE Qscript Execution Succeeded!

    The information that would appear in that space would be any new DBs that were discovered.



  • Re: Editing text before e-mail
    Posted: 08-04-2014, 10:08 PM

    Attached is a sample script which will convert that qscript output to be a little more user friendly in an email.  This script reads through a variable list and builds a single string that you can insert into the email body.

    First you'll want to add a Script activity before the email activity and paste the script from the attachment into this activity.  Then you'll want to change the following line to point to your variable that contains the qscript outputs.

    List values = xpath:{/workflow/variables/values};

    Also if you are inserting this into an HTML email, then you can change the line sb.append("\n") to sb.append("<br />") so you'll have a line break in between each client databases.

    Then in your email activity just link to the output of this script instead of your variable list.

    Attachment: script.txt
  • Re: Editing text before e-mail
    Posted: 08-05-2014, 8:14 AM

    Worked like an absolute charm. Thank you SO much! If you work for CommVault do me a favor and PM me your full name so I can send our managed service rep a commendation.


    If you don't work for CV then thank you for taking time out to help a complete stranger.

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.
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy