How to prevent Xano from returning Decimal (12.00) as Integer (12) ?
I work with flutter-flow with strict type.
There are often scenarios where a Decimal-type value (like 12.00) is returned as an Integer (12) by Xano.
Flutter would throw an error "int" not a subtype of "double".
I tried the number_format function in Xano to convert integer to decimal. This converts the number to a String and then I have to convert the String to Double on the client.
To be honest, it seems like unnecessary code gymnastic to solve Xano's limitation.
Any help would be much appreciated.
Answers
-
Hello @Abhishek B
I had the same issue
To solve it I had to convert the Table fields on Xano to an integer.
And use the last two digits as decimals as stripe is don'.
After that I never had the same issue.
Let me know if you need more info.
-
i hope i understood you correct, then you can easy solve this on fly with filters whenever you need to. like so.
I hope that helps
-
@Max @Lefteris - buynocodeapps.com I already use number_format. It returns the result as a string instead of decimal. I think we'll have to wait for Xano to deem this issue relevant.
-
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback