I was trying to express numeric value to words and changing currency from Dollars to Pesos. I did so through the following discussions:
Details:
NOTE#1 - User Entered
NOTE#2 - Calculated (Read only)
NOTE#3 - Text Field. Calculated (Read only) WordNum from numeric value in NOTE#2.
topmostSubform.Page1.Amount::calculate - (FormCalc, client)
Replace ( Replace ( Replace( Replace ( WordNum (topmostSubform.Page1.Total, 2) , "Dollars ", "Pesos"), "Dollar ", "Peso"), "Cents", "Centavos"), "Cent", "Cent")
Just the way I wanted it to display, unfortunately as you may have noticed in the image in NOTE#3 the value read as:
How do I correct it to:
And is it possible for me to able to have the value in upper case with at the end with ONLY.
Pardon me guys but I am NOT that good with scripts.
Thank you in anticipation of your positive response.
Solved! Go to Solution.
Hi,
try this.
It combines 2 more functions (Upper() and Concat()) with your existing script,
if (not topmostSubform.Page1.Total.isNull) then
$ = Concat( Replace( Replace( Upper( WordNum(topmostSubform.Page1.Total, 2) ), "DOLLARS", "PESO" ), "CENTS", "CENTAVOS" ), " ONLY" )
else
$ = ""
endif
Hi,
try this.
It combines 2 more functions (Upper() and Concat()) with your existing script,
if (not topmostSubform.Page1.Total.isNull) then
$ = Concat( Replace( Replace( Upper( WordNum(topmostSubform.Page1.Total, 2) ), "DOLLARS", "PESO" ), "CENTS", "CENTAVOS" ), " ONLY" )
else
$ = ""
endif
THANK YOU very much for you're response.
if (not topmostSubform.Page1.Total.isNull) then
$ = Concat( Replace( Replace( Upper( WordNum(topmostSubform.Page1.Total, 2) ), "DOLLARS", "PESOS" ), "CENTS", "CENTAVOS" ), " ONLY" )
else
$ = ""
endif
Here's the result with just a few adjustment:
if (not topmostSubform.Page1.Total.isNull) then
$ = Concat( Replace( Replace( Replace( Replace( Upper ( WordNum(topmostSubform.Page1.Total, 2) ), "DOLLARS", "PESOS" ), "DOLLAR", "PESO" ), "CENTS", "CENTAVOS" ), "CENT","CENT"), " ONLY" )
else
$ = ""
endif
Again, THANK YOU. Learn a few things from this. cheers to all.
IF others have something else in mind, please do not hesitate to share and post. Thank you. *cheers*
Views
Replies
Total Likes
Views
Likes
Replies