@ReplaceSubstring equivalent in LotusScript.
Posted on 2004-08-24
I've the following code in my agent
Let Cnam = Trim$(doc.Custname(0))
Let CIAccount$ = Ucase(Cnam)
Set Collection = db.getView("*Counts\CBCN").getAllDocumentsByKey(CIAccount$)
If Collection.Count = 0 Then
Now In the view "*Counts\CBCN" I've the first column as the following: @ReplaceSubstring(@UpperCase(@Trim(CustomerName)); " "; "+")
I'm replacing all spaces with +.
Now I've to do the same in CIAccount$.
Lets say if the user enters "IBM Data Services Inc" in the doc.Custname(0) field in the form
The CIAccount$ will have "IBM Data Services Inc". I want it as IBM+Data+Services+Inc.
If I do not replace spaces with + here the search will not work.
Now you can tell me that just change the column formula to @UpperCase(@Trim(CustomerName)). But that is not what I want to do here becuase,
Lets say if the User is entering just "AA" in the doc.Custname(0) field and in the view "*Counts\CBCN" I've "AAA - R", It is still considering as a match which is incorrect. I guess it all becuase of the spaces.