%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
stTextValText value of Status text.
stTextHbjA reference to object of the Status text type.
lngIdxLanguage identifier. If it is not stated or it is of value -1, then the current language is used.
lngNameText 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 the language.

Return value
The return value is the Status text value which the specific string is defined for.
If there are more values with the same string for one Status text, the 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")
Napíšte komentár