Genpact Cora Knowledge Center

Support

Add a Custom Column on a Webpart

Learn how to add a custom column to a Cora SeQuence webpart.

In the Template property, you specify the HTML that is rendered in the column. You can write JavaScript code between # signs, and the data variable contains the row's data. You can reference any column that is defined in the ServiceMetadata file, and also variables that are propagated to the webpart.

Procedure

  1. Navigate to C:\Program Files\PNMsoft\Shared Resources\Components\Flowtime\Config\ServiceMetadata.
  2. Locate the config file for the webpart that you want to add a column to.
  3. Copy and rename the config file.
    For example, add the word custom to the file name: MessagesServiceMetadata.config to MessagesServiceMetadataCustom.config.
  4. In the custom config file, add a section similar to the following example.
    <CustomColumn
    		
         Name="MyColumn"	
         Caption="My Column"
         ShowCaption="true"
         Template="&lt;span title='#=data.Tooltip#'&gt;#=data.Content#&lt;/span&gt;" />
  5. Navigate to C:\Program Files\PNMsoft\Shared Resources\Components\Flowtime\Config, and copy the Services.config file
  6. Rename the file to Services.Custom.config, and save it in  C:\Program Files\PNMsoft\Shared Resources\Components\Flowtime\Config\ServiceMetadata.
  7. In the Services.Custom.config file, in the ServiceMetatdata section of the webpart that you want to add the column to, change the path to the new Service Metadata config file you created.
    In our example, ServiceMetadata="~/shared resources/Components/Flowtime/config/ServiceMetadata/MessagesServiceMetadataCustom.config