@Word function in LotusScript
There is an @Word function in Lotus Notes which is useful for extracting a value from a string with known separator.
Example:
If MyString is a string as follows:
'Value1~Value2~Value3~Value4~Value5~' then Word( Mystring;"~";3) will return Value3
You can write a similar function in LotusScript to obtain the same result.
Code: ReturnValue = ExtractValue(mystring, "~", 3) Function ExtractValue(PassString As String, Sep As String, Pos As Integer) As String Dim StartPos As Integer Dim GetPos As Integer StartPos = 0 GetPos = 0 For i = 1 To Pos StartPos = GetPos GetPos = Instr(StartPos + 1, PassString, "~") Next ExtractValue = Trim(Mid$(PassString,StartPos+1,GetPos-StartPos-1)) End Function