on 02-08-2023 12:04 AM
Hi, The purpose is to show only the decimals of an amount, for example, the amount is 1,800.00, take the 00 and show it like this: 00/100, if the amount is 1,700.51, show 51/100, I hope you can help me, thanks.
Hi marlin.catari ,
I tried to get the decimal part but didn't try to format, maybe this helps you anyway.
I have two Text Fields called debug1 (has binding to a decimal value) and debug2 (has script). In the script I read the value from debug1 and split it as you need it, afterwards it will be shown in debug2.
What's still missing is your formatting. I will give that a try later (or you get this done in the mean time).
Best regards
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks So much!!! I could solve, excellent answer.
Hi Marlin,
you can extract the decimal value via modular operation.
It should work like this: x,yy * 100 mod 100 = yy
After this you just add the suffix.
This would look like this:
FormCalc: TextField1 = Concat( Mod($*100, 100) , " / ", "100" )
Javascript: TextField2 = (parseFloat(this.rawValue) * 100 % 100) + " / " + "100"
The scripts assume they are placed in a decimal field and overwrite the content of another text field.
You can adjust this to your form.
Best regards
Pascal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.