Concatinate values

Hi All,

I have editable field example Field1 where the user can enter values such as “ABCD 432-AB 4225”, I want to transulate to ABCD432AB4225". The value entered is not predictable it could be “.” instead of space or . - etc.,

I would like to eleminate .,space, - and have only letters & numbers.

I looked at @Implode it not work.

Any suggestions would be appreciated. Thanks in advance.

Subject: Concatinate values

Take a look at @replacesubstring and @replace in designer help.

Subject: Concatinate values

If you are not sure what characters you need to eliminate, try lotus script code as below in the field’s “onBlur” event:

Concatenates only the alphanumerics by checking each one in the string and eliminates non-numbers and non-alphabets and finally updates the field with only concatenated alphanumerics.

Dim ws as new notesUIWorkspace

Dim uidoc as NotesUIDocument

Dim tmpstr As String, tmp As String

Dim tmpres As String

set uidoc = ws.CurrentDocument

tmpstr = “ABCD 432-AB 4225”

tmpstr = Ucase(tmpstr)

For i=1 To Len(tmpstr)

tmp = Mid$(tmpstr, i, 1) 

If (Asc(tmp) >= 48 And Asc(tmp) <= 57) Or (Asc(tmp) >= 65 And Asc(tmp) <= 90) Then

	tmpres = Trim$(tmpres & tmp)

End If

Next

Call uidoc.FieldSetText(“YourField”, tmpres)

Call uidoc.Refresh

Subject: Concatinate values

you can use in input translation:

@replacesubstring(fieldname; " “:”.“:”-“;”")

However this will only remove “-”, “.” and “-”. for each type of special characters, you have to update this formula accordingly.

Subject: RE: Concatinate values

Thanks for your responses. it works.