MakeList

This function executes a pass-through SQL ‘select’ statement against the ERP system’s database and converts the results into a scrolling list. You may use App.ShowList to display the list to the user. The first ERP data connection is assumed as the source.

Group: Enterprise Resource Planning Extensions


Syntax: sMyList = ERP.MakeList(sSQL, [bRtnAllCols], [bNormalize], [bScale, nMaxRows)

sMyList       (String) is the list to be returned for display (i.e., set RSP = MyList to display the list on the Client device.)

sSQL          (String) is the SQL 'SELECT' statement to be sent to the database.

bRtnAllCols (Boolean) Optional – when set to True will return all the columns as the potential key, not just the first column. Default is False.

bNormalize  (Boolean) Optional – when set to True will trim the spaces from the data so that it will display consistently. Default is False.

bScale        (Boolean) Optional – formats the numeric values in the specified column if the database does not store decimals. This option will position a decimal at a position from the right side. A comma will be used for large numbers. This field is locale specific and will use the appropriate characters for each region. Default is True.

nMaxRows  (Long) Optional – limits how many rows will be allowed in the list. Default is 500.

Example:

Dim sSQL As String

Dim sMyList As String

sSQL = "select PartNo from ItemMaster"

sMyList = ERP.MakeList(sSQL, True, True, True, 1000)

Rsp = App.ShowList(sMyList)

Or

Rsp = App.ShowList(ERP.MakeList(sSQL, True, True))