Skip to main content
Skip table of contents

p$TDV:Util:Select


p$TDV:Util:Select

Display a selection screen to select an item. The selection list is automatically assembled based on the delivered format text. For example, this dialog can be called in order to select a data set directly after a search in the database.

The sequential number of the selected item (i.e. row number or index) is returned as the result of a function.

If only one element is transferred to the selection (number=1), no screen is established, but this element will be selected automatically (return 1).

Please note:

All parameters used in format text have to be defined globally!

Hint: For the display and editing of data of one parameter group, the functions dealing with parameter groups can be used.

Syntax:

Index = p$TDV:Util:Select( Mode, Headline, FormatText, Count )

 

Argument

Type

Meaning

 

Mode

Integer

Editing mode (currently always 1)

 

Headline

String

Headline above the selection box (standard text: 'Please select one element from the list view')

 

FormatText

String

Format text for filling the list (description see p$TDV:Util:ParText)

 

Number

Integer

Number of items to be returned

Result:

Integer

Index , or the sequential number of the selected element, or 0 if selection was cancelled, or -1 if no element was processed (number<=0)

Example:

Search in the address database with subsequent selection:

Status = p$TDV:SMPAPI:L_Table( 'Addresses' , 'TM_Address' , 'Address_s' , 'Num_Addresses')

Headline = 'Please select a customer from the list'

Format = '@addresses[i]company1@'

No = p$TDV:Util:Selection( 1, Headline, Format, NumFound)

Subsequently the parameter No has to be checked so that a possible termination of the process by the user or by a failed search can be handled. Please note that between the execution of the search and the selection, no status check is necessary.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.