DataSetTableName

You can use the DataSetTableName function to determine the logical table name for a specified detail code. This makes it easier to work with the appropriate table in an ADO.NET DataSet returned by ObjectDataSet.

When to use

You can use this function when you need to look up table names programmatically.

Syntax

string DataSetTableName(string objSymbol, string objKey, string dtlCode);

Parameters

Parameter Type Required Description
objSymbol string Optional

The symbol of the object.

Note: You can use empty quotation marks ("") for the current workflow symbol.
objKey string Optional

The key of the object.

Note: You can use empty quotation marks ("") for the current workflow symbol.
dtlCode string Yes The system detail code to resolve to a table name. For example, "INGR", "HEADER", "VIEW.V\\VIEWINFO1"

Return Value

The application returns a string containing the table name displayed in the DataSet.

Prerequisites

  • The detail codes need to be valid for the object type.
  • You can use DataSetTableName() before ObjectDataSet() due to the restriction on calling Optiva script functions after initializing the in-memory DataSet copy.

Example

Basic Usage - Get Ingredient Table Name
DataSet ds = ObjectDataSet("", "", "INGR");
Description
This example gets the database table name of INGR table for the current object.