...
Not directly, but we can do the following:
$system$sys.time provides value like:
18:40:44.165
We can use the “Regex Extract” to extract the last 3 digits (milliseconds) using Regex
.([0-9]{3})
and the last digit of seconds([0-9])\.
, that is 4.165 and save it in $flow.key.otp_1 and otp_2Concatenate both to create a 4 digit OTP.
...
Operation Widget Overview(Kindly Ignore the Operand $sys.datetime in the snippet below → It’s $sys.time only.
2. Input
...
3. $flow.key.otp_1
...
4. $flow.key.otp_2
...
5. $flow.key.otp
...
2. How do I say an amount in Lakhs & Crores with Google TTS?
Google TTS does not play Lakhs and Crores in English language. It does play the same in regional languages like Hindi.
To get Google TTS to play Lakhs and Crores, we’ll have to divide the lakh part and thousand part, and then play them separately. This can be achieved by using the Operation Widget which has modulus, subtraction and division operators in Number Manipulation.
We also need to add a Decision Widget to check if the amount is > 1,00,000. If not, keep $flow.key.amount_text = $flow.key.amount only.
Final Flow:
Decision Widget
If ($flow.key.amount >= 100000)
Operation Widget
$flow.key.amount = 350000
$flow.key.thousands = $flow.key.amount % 100000 = 50000
$flow.key.lakhs = ( $flow.key.amount - $flow.key.thousands ) / 100000 = (350000 - 50000)/100000 = 3.5
$flow.key.amount_text = Play “$flow.key.lakhs Lakh and $flow.key.thousands” → “3 Lakhs and 50000”
Else
Operation Widget
$flow.key.amount_text = $flow.key.amount
Play Widget
Play “Your amount is $flow.key.amount_text”
For $flow.key.amount_text = 350000, it will play
“Your amount is 3 Lakhs and 50 thousands”
For $flow.key.amount_text = 90000
“Your amount is 90 thousands”.
Screenshots:
Decision Box:
...
Operation Widget:
...