Skip to content

createStyleForDataTablesInBody (Team Notifications, Alerts and Collaboration)

Compatible with:
  • Purpose
  • This command is used to create (define) the 'style' for the data tables that you will append to the email body (name) using the command 'createBodyPartFromDataFile' and/or the command 'createBodyPartFromDataSet'.

    The 'target' for this command will have to be a JSON that defines the style for the data tables. The style includes the font style, size, cell background color, etc for the data table header row as well as the same attributes for the rows in the data table.

    The style that is defined by use of this command will 'automatically' get applied to all data tables (body parts) appended into the email body (name).

    The JSON string passed as input into the 'target' for this command can contain the style for the header and the data rows for the data tables as suggested below:

    {"table": "style=\"border-collapse: collapse; border-spacing: 0; border: 1px solid #e0e0e0;\"","tbody": "style=\"background: #fbfafa;\"","th": "style=\"color: #ffffff; background: #2969ae; font-weight: bold; padding: 8px;  font-size: 0.9em; text-align: center;\"","tr": "style=\"background: #fbfafa;\"","td": "style=\"font-weight: normal; padding: 8px;  font-size: 0.9em; text-align: left;  border-right: 1px solid #e0e0e0;  border-bottom: 1px solid #e0e0e0;\""}   

    If you have data tables in the email body but you did NOT specify the style to be applied using this command, Worksoft SaaS will apply the default Worksoft SaaS standard style to the data tables, described below:
    • Table Header: "style=\"color: #ffffff; background: #2969ae; font-weight: bold; padding: 8px; font-size: 0.9em; text-align: center;\"";
    • Table Even Row: "style=\"background: #ffffff;\"";
    • Table Odd Row: "style=\"background: #fbfafa;\"";
    • Table Cell: "style=\"font-weight: normal; padding: 8px; font-size: 0.9em; text-align: left; border-right: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0;\"";
    • Table: "style=\"border-collapse: collapse; border-spacing: 0; border: 1px solid #e0e0e0;\"";
  • Syntax
  • createStyleForDataTablesInBody
  • Target
  • createStyleForDataTablesInBody(Optional)
  • Value
  • N/A
  • Return Value
  • N/A



 

Feedback and Knowledge Base