kalios
asked on
@ReplaceSubstring equivalent in LotusScript.
Hi,
I've the following code in my agent
Let Cnam = Trim$(doc.Custname(0))
Let CIAccount$ = Ucase(Cnam)
Set Collection = db.getView("*Counts\CBCN") .getAllDoc umentsByKe y(CIAccoun t$)
If Collection.Count = 0 Then
'Display MessageBox
Else
'Do Processing
End If
Now In the view "*Counts\CBCN" I've the first column as the following: @ReplaceSubstring(@UpperCa se(@Trim(C ustomerNam e)); " "; "+")
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(CustomerN ame)). 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.
Please advise.
thanks
Kalios
I've the following code in my agent
Let Cnam = Trim$(doc.Custname(0))
Let CIAccount$ = Ucase(Cnam)
Set Collection = db.getView("*Counts\CBCN")
If Collection.Count = 0 Then
'Display MessageBox
Else
'Do Processing
End If
Now In the view "*Counts\CBCN" I've the first column as the following: @ReplaceSubstring(@UpperCa
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(CustomerN
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.
Please advise.
thanks
Kalios
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've used Hemanths. It works great.
Kalios