I'm encountering an issue with a Custom Query in a Server Connect that returns numeric values, but I'm having trouble displaying them properly on my page.
Problem with Array Recognition:
When I insert the Server Connect into the page, Wappler doesn't recognize the result of the query as an array (see Screenshot 1). This seems to be the first problem.
Values Displayed as Text:
I created a table to display the values returned by the Custom Query, but Wappler treats these values as text instead of numbers (see Screenshot 2).
Formatter Issue:
I tried changing the Type from "Text" to "Number" and adding a formatter to handle the values correctly (see Screenshot 3), but once I confirm the changes, the numbers disappear from the table.
Could someone please help me resolve this? I'm unsure why the values are being misinterpreted, and how I can ensure they are treated and displayed as numbers.
I suppose you talk about a numeric DECIMAL value...
It is known that decimal values are represented as text on client side.
I suppose in your case is easy to control it on serverside.
Create an ArrayList, define the 5 fields you need (set valore_medio_imu as a decimal)
Add a repeat after your custom query and loop through it.
Now disable the custom query and output the arraylist.
I'm on mobile, think I'm correct.
If you have problem ask again buddy
Hello @famousmag thank you for your hint.
I made a test and with an array, the frontend see the query as an array and values as number.
But when I apply '.formatNumber(2, '.', ',')' numbers disappears from table...
Here the movie: