Posts Tagged: ‘Unica Plan’

Manage TVC-Grid Validation in Unica Plan – A Systematic Way

12. November 2020 Posted by Nitin B. Chondhekar

Marketers are always looking for tools and processes to manage their marketing operations, streamline workflows, optimize the budget spend, resources, and manage other marketing assets. MRM is a single solution that can take care of all your needs, from strategic planning to executing a certain marketing activity and ensuring that consistency binds the team together. Unica Plan is the solution that Unica Suite offers to manage all your marketing needs and activities.

HCL Unica Plan (Formerly known as Marketing Operations) supports the feature called Tabular View Control (TVC) Grid, where the marketer can choose and arrange the different attributes like Text, Numeric, Date, etc. which they want to use for tracking their business activities. Grids are mainly used for collecting data, in the user interface, it appears like a table or a list. You can enter data into the cells of the grid according to the selected attributes and their data type.

Apart from this, the product supports the customization of grid attribute(s) with validation; for example, the attribute should start with a specific character/word OR attribute should not allow entering beyond a certain limit OR attribute should only allow data between a certain range, etc. “com.unicacorp.uap.grid.validation.plugin.GridValidatorPluginImpl” validator is delivered with HCL Unica Plan which can help you to define the validations on-grid attribute(s). This validation plug-in supports two types of rules.

  1. ROW: row-level rules are executed first.
  2. GRID: grid-level rules are executed after row-level rules.

HCL Unica Plan ships with the following sample rules.

  • BeginsWithRule
  • DateCheckRule
  • RangeCheckRule
  • UniqueCheckRule

This article will help you to understand the grid validation, data validation rules, and how to implement the ROW level validation using the “BeginsWithRule” rule with the Text Single Line Type attribute. Let’s follow the step by step approach to learning the validation.

  • Create the new grid frame using the Form Definitions section.

  • Create a grid type attribute. In this example, we are using a Text Single Line Type.

  • Add the newly created Grid Text Single Line Type attribute to the grid canvas and publish the grid for further use.

  • Create an XML file to contain one or more rules as per the business need. As mentioned earlier in this blog, we are using “BeginsWithRule.”

  • Each XML tag used in this file has its own usage. To build the “BeginsWithRule” scenario, you need to mainly use:
<applies-to-tvc-id>GRID INTERNAL NAME</applies-to-tvc-id>  
<set-property property="beginCharacter" value="YOUR VALUE"/>
<set-property property="column" value="GRID_TABLE_NAME.GRID_ATTRIBUTE_DATABASE_COLUMN_NAME"/>
  • Populate the value for: <applies-to-tvc-id>GRID INTERNAL NAME</applies-to-tvc-id>

  • Populate the value for <set-property property=”beginCharacter” value=”YOUR VALUE”/> <set-property property=”column”>

Note: You can keep the “beginCharacter” as per your business need. In this example, let’s keep the value as “YOUR VALUE.”

  • Populate the value for <set-property property=”column” value=”GRID_TABLE_NAME.GRID_ATTRIBUTE_DATABASE_COLUMN_NAME”/>

  • Upload the rules file (.xml) via “Rules definitions” section.

  • Use this Rule Definition file and the form having the grid into an HCL Unica Plan object template, for example: Project. Specify “com.unicacorp.uap.grid.validation.plugin.GridValidatorPluginImpl” as value for “Data validation class” property and save the changes.

  • Create an object from this template, and test the rule.

  • Successful test result when grid Text Single Line attributes value matches, to begin with, validation.

  • Failure test result when grid Text Single Line attributes value does not match, to begin with, validation.

Based on the business need, you can implement the BeginsWithRule, DateCheckRule, RangeCheckRule, UniqueCheckRule rules with Grid. For more details, you can refer to the documentation on Grid Validation. You can reach out to us for any more queries, and we will be happy to help.