We want to convert number to words in vDesigner 1.0, can we do that? If yes, then how?
NUM_TO_WORDS function as the name suggests is a function which is used to convert number to
words, that is, 12 → twelve.
In this function, three parameters are provided, which are, number, enable decimal conversion, case
respectively
Below is an example of the complete syntax for the NUM_TO_WORDS Function:-
NUM_TO_WORDS(number, enable decimal conversion(true/false), case(LOWER, UPPER, TITLE))
Below are some examples for this function:-
let the number be 123.22
let the second parameter be false
and the third parameter be TITLE
below is the query representing the above parameters:-
NUM_TO_WORDS(123.22, false, TITLE)
Result:- One Hundred Twenty Three
this function can be used in copy value and group copy as well. And the number can be fetched from json
path as well as from a control.
NOTE:- IF THE SECOND PARAMETER IS LEFT EMPTY THEN THE DEFAULT VALUE IS
PICKED UP AS FALSE AND IF THIRD PARAMETER IS LEFT EMPTY THEN THE DEFAULT
VALUE IS PICKED UP AS LOWER.
Below are the queries if parameters are empty:-
NUM_TO_WORDS(123.22, TITLE)
NUM_TO_WORDS(123.22, false)
NUM_TO_WORDS(123.22)
Queries that are wrong:-
NUM_TO_WORDS(123.22,TITLE)
above query will not be converted to NUM_TO_WORDS(123.22, false, TITLE)
kindly place the parameters as mentioned in the examples
NOTE:- BEFORE DECIMAL NUMBER UPTO 1000 CRORE IS SUPPORTED AND AFTER
DECIMAL UPTO 4 DIGITS ARE SUPPORTED. IF MORE THAN 4 DIGITS ARE INPUT AFTER
DECIMAL THEN, IT ROUND UP TO 4 DIGITS.