How to extract data from a GridView control to WorkflowGen process data?
If you require data from within a GridView control to be stored within a process data in WorkflowGen, you can do this by accessing specific information from the GridView. Keep in mind that GridViews are dynamic, meaning that they can contain zero or multiple rows of data, whereas WorkflowGen process data is static.
The following example will extract a specific data element from a specific row of the GridView and pass the value back to WorkflowGen.
Suppose you have a GridView called
GV_USER with 3 columns:
Details, each containing a textbox control with the ID
Furthermore, the user has entered 5 rows of data. If you need to extract the Name from the first row of data, do the following:
Create a process data (ex.
FIRSTUSERNAME) to store this particular GridView value.
Create an OUT direction action parameter with the proper syntax (
GRIDVIEW_ID[x]/ELEMENT_ID). In this example, we would create a parameter with the name
Set the OUT parameter to receive the value into the process data
GRIDVIEW_IDis the .NET ID of the target GridView and
xis the row index of the GridView data row. It is not zero base, meaning the first row is 1, not 0.
ELEMENT_IDis the .NET ID of the control (textbox in this case) within that row.
In the event that the GridView has no data or the row index that you specify does not exist, WorkflowGen will just set the process data to null.