on 2013 Jan 30 2:53 PM
hello all,
i have the ff. requirement: let say this is the content of my DB field
"Some text in this text field, Some text in this text field, Some text in this text field, Some text in this text field, Some text in this text field, Some text in this text field, Some text in this text field,
1,234,456.00"
now is it possible to display the numeric characters into asterisk like instead of displaying 1,234,456.00 it will display *,***,***.** or any character.
any suggestion or a workaround...
thanks & advance
Fidel
As an example I created a formula in Basic Syntax called NoNumbers where TestCol is the database field that has the numbers that are to be replaced with asterisks. Basically I am looping through the string of data in one character at a time and replacing that character with an asterisk if it is a number.
Dim intLength as Number
Dim intCurrentPosition as Number
Dim strCurrentCharacter as String
Dim strNewText as String
intLength = Len({Command.TestCol})
intCurrentPosition = 1
Do While intCurrentPosition <= intLength
strCurrentCharacter = Mid ({Command.TestCol}, intCurrentPosition, 1)
If IsNumeric (strCurrentCharacter) Then
strNewText = strNewText + "*"
Else
strNewText = strNewText + strCurrentCharacter
End If
intCurrentPosition = intCurrentPosition + 1
Loop
formula = strNewText
Here is a screenshot of my Formula Editor window for NoNumbers so you can see it in the appropriate context.
I hope this helps you out.
Noel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
10 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.