From_String

From_String

%From_String function


Function

The function converts a string of Status text into its value. It is inverse function to %To_String function.

Deklarácia

UNIVAL %From_String( TEXT in _stTextVal, HBJ in _stTextHbj[, INT in lngIdx = -1 | TEXT in lngName] )

 

Parameters

stTextVal

Text value of Status text.

stTextHbj

Reference to object of Status text type.

lngIdx

Language identifier. If it is not stated or it is of value -1, then the current language is used.

lngName

Text language identifier - name of language. Optional parameter, default=0

 

If it is specified and it is of the INT type, then:

 

  • -1 - current language set by logged in user,

  • 0 - does not use a dictionary,

  • >0 - index of existing language.

If it is specified and it is of the TEXT type, then it is considered to be a text identifier of language - name of language.

 

Return value

The return value is the Status text value which the specific string is defined for.
If there is more values with the same string for one Status text, value of the first string will be returned!

Example

TEXT _text INT _value _text := %To_String(61, NovyStavovyText\HBJ) _value := %From_String("Piaty Text",NovyStavovyText\HBJ) _value1 := %From_String("Piaty Text",NovyStavovyText\HBJ, 1) _value2 := %From_String("Piaty Text",NovyStavovyText\HBJ, "1") _ivalue3:= %From_String("Piaty Text",NovyStavovyText\HBJ, "Slk")