Use Data Population for the AgilePoint WFComment Control in ASP.NET applications

Summary

This article provides information on how to use AgilePoint Data Population for the WFComment Control in AgilePoint ASP.NET applications.

Resolution

Use AgilePoint Data Population for the WFComment Control by following these steps:

  1. Create a Table in the database where you want to store the Comments data. 
    CREATE TABLE [dbo]. [Comments](
    [CommentBy] [varchar] (50) NULL, 
    [CommentDate] [datetime] NOT NULL,
    [CommentText] [varchar] (300) NULL,
    [RefNo] [varchar] (50) NOT NULL,
    CONSTRAINT [PK_Comments] PRIMARY KEY CLUSTERED
    (
    [CommentDate] ASC
    ) WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
    IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON
    ) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
  2. Map the Parent Table and Child Table (Primary Key and Foreign Key) relationship:
  3. In AgilePoint Envision, add the Schema for the WFComment Control for Data Population.
  4. Schema Mapping for the Data Population:
  5. Drag and drop the WFComment Control on the .aspx page and set the DataBinding property:
<ap:WFComment 
 ID="WFComment1"
runat="server"
BarColor="SteelBlue"
BarHeight="1px" BindingName="/pd:BudgetRequest/pd:Comments" CommentBackColor="Orange" CommentCaption="Add Comment" CommentFontSize="Small" CommentListBackColor="Orange" CommentListCaption="Comment History" CommentListTitleAlign="Left" CommentTitleAlign="Left" CommentWrap="False" CustomFormat="{0} by {1}" Height="100px" HistoryCommentBackColor="White" MappingComment="pd:CommentText" MappingDate="pd:CommentDate" MappingName="pd:CommentBy" OuterXmlTemplate="PHBkOkNvbW1lbnRzIHhtbG5zOnBkPSJodH RwOi8vd3d3LmFzY2VudG4uY29tL3Byb2Nl c3Nlcy5CdWRnZXRSZXF1ZXN0Ij48cGQ6Q29tbWVudD48cGQ6Q 29tbWVudEJ5PlN0cmluZzwvcGQ6Q29tbWVudEJ5 PjxwZDpDb21tZW50RGF0ZT5EYXRlVGltZTwvcGQ6Q29tbWVudERh dGU PHBkOkNvbW1lbnRUZXh0PlN0cmlu ZzwvcGQ6Q29tbWVudFRleHQ PC9wZDpDb21tZW50PjwvcGQ6Q29tbWVudHM " Width="101%" style="margin-bottom:10px" />