How can I insert additional data table in my FormData in Simple Mode?

Issue

How can I insert additional data tables to my FormData in Simple Mode?

Solution

WorkflowGen automatically generates the <Table1> XML node and any additional data tables based on GridView .NET controls. You can insert your own DataTable into this.FormData (or Me.FormData in VB) dataset object. This way your custom data table can carry the information throughout the WorkflowGen request.

The WorkflowGen.My class will update Table1 and Gridview tables without affecting any extra data table.

You can append your data table to a FormData dataset first, then use the WorkflowGen.My class FillFormData() method to update the formdata.xml file before submission of the form.

Example

C#

// Add the people list datatable if it is not in the simple mode FormData already
if (!FormData.Tables.Contains(peopleListDataTable.TableName))
{
// Add the peopleList table in the simple mode FormData
FormData.Tables.Add(peopleListDataTable);
// Refill the form data
FillFormData(FormData);
}

VB.NET

// Add the people list datatable if it is not in the simple mode FormData already
If Not FormData.Tables.Contains(peopleListDataTable.TableName) Then
// Add the peopleList table in the simple mode FormData
FormData.Tables.Add(peopleListDataTable)
// Refill the form data
FillFormData(FormData)
End If