Skip to main content
Skip table of contents

p$TDV:Util:SetArray


p$TDV:Util:SetArray

Using this function, a string-parameter array can be filled automatically. The filling process is conducted by a format text similar to that used for the function p$TDV:Util:ParText.

Within the format text, an index parameter named i is automatically provided - the row number. This parameter i can be used for other arrays or indexed groups of parameters serving as sources for the array to be filled, for example.

Please note: The parameter array in which the array name is transferred is directly assigned as a string, and is therefore surrounded in quotation marks. Moreover the array itself and all of the parameters used in the format text have to be global!

Syntax:

p$TDV:Util:SetArray( ArrayName, FormatText, MaxIndex )

 

Argument

Type

Meaning

 

Array name

String

Name of the string array to be filled

 

FormatText

String

Format information analog to p$TDV:UTIL:ParText

 

Number

Integer

Maximum array index to be filled up to

Result:

-

 

Example:

Transfer of information of an indexed parameter group into an array parameter, e.g. for a combination or list array output.

 

The one-fold indexed PG 'article', e.g. as a result of a search in a database with the parameters 'Ident' (ident number) and 'name':

Article[1].Ident = '4711'
Article[1].name = 'Article 4711'
Article[2].Ident = '4712'
Article[2].name = 'Article 4712'

 

Then these results follow:

FormText = '@Article[i].Ident@ : @Article[i].name@'
p$TDV:Util:SetArray( 'List', FormText, 2)

 

results in

List[1] = '4711 : Article 4711'
List[2] = '4712 : Article 4712'

JavaScript errors detected

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

If this problem persists, please contact our support.