GetNewRow

Returns a blank row for the requested detail code. Suppose the detail code has an auto-sequenced line ID column; then the value of the next row number is assigned to the new row automatically.

Purpose

This function returns a blank row for the requested detail code.

Note: If the detail code has an auto-sequenced line ID column. Then the value of the next row number is assigned to the new row automatically.

Syntax

GetNewRowReturn GetNewRow(string objSymbol, string objKey, string DetailCode)

Return Value

If the code is successful, it displays a DataRow object for the requested detail code.

Arguments

Argument Description
objSymbol The object type or current object type of the data.
Note: Use empty quotation marks to indicate the current symbol of the workflow.
objkey The object key or current object key of the data.
Note: Use empty quotation marks to indicate the current object of the workflow.
DetailCode The DTLCODE (Detail Code) corresponding to the tabs in the Optiva object need to be specified as these codes identify specific sections or data categories within Optiva.

For example:

  • TPALL — Represents the Parameters tab, containing all parameter details.
  • INGR — Represents the Formula Ingredients tab, listing all ingredients in a formula.
  • HEADER — Represents the Main or Header tab, containing general or summary information.

Return

ADO.Net DataRow object. See http://msdn.microsoft.com

Examples

This example returns a DataRow corresponding to the DTLCODE - BYPROD within the Byproducts tab of the current Optiva object where the workflow is running.

This DataRow acts as a container to add data in the form of key-value pairs. After populating it, you can call CommitNewRow to insert and save the data in the new row under the Byproducts tab.

Refer, CommitNewRow Examples for more understanding on how to use newIngrRow DataRow.

DataRow newIngrRow = GetNewRow("", "", "BYPROD");

This example returns a DataRow corresponding to the DTLCODE - LABEL within the labels tab of item SALT.

DataRow newIngrRow = GetNewRow("ITEM", "SALT", "LABEL");

This example returns a DataRow corresponding to the DTLCODE - MCLAIM within the Manual Claims tab of Label Content LC\001.

DataRow drNewRow1 = GetNewRow("LABELCONTENT", "LC\001", "MCLAIM");
Note: 

They can be used to complete these tasks:

  1. Add rows to any Optiva object.
  2. Access the DataSet object in a workflow script.