AG 24.18
I have a unit price from Product table. The unit price field is formatted for currency display using Data Format.
In the Invoice table, unit price is a lookup field from Product table, and this table has quantity and total price. Both unit price and total price are formatted for currency display using Data Format.
The unit price in Product table is displaying the currency symbol correctly.
The total price in Invoice table is also displaying the currency symbol correctly.
But there is no currency symbol for the unit price in Invoice table, which is a lookup field.
What is expected: the unit price in Invoice table can be formatted according to the Data Format setting for the field as well.
Data Format not applied to Looking Field value
Re: Data Format not applied to Looking Field value
I found out that currently, Data Format is not applicable for calculated field.
However, I discovered another bug.
All the fields are set to have a length of 10.2
The unit price displays 2 decimal place, which is correct.
The qty displays 2 decimal place, which is correct. I allow decimal place in qty, because the qty can be 0.5 and other non-integer value.
The total price displays 4 decimal place, which is not correct.
I checked inside MySQL database, the total price is stored as 2 decimal place.
However, I discovered another bug.
All the fields are set to have a length of 10.2
The unit price displays 2 decimal place, which is correct.
The qty displays 2 decimal place, which is correct. I allow decimal place in qty, because the qty can be 0.5 and other non-integer value.
The total price displays 4 decimal place, which is not correct.
I checked inside MySQL database, the total price is stored as 2 decimal place.
Re: Data Format not applied to Looking Field value
For calculated fields, you should apply the data formatting into the calculated field SQL query. You could use the SQL function
Reference: https://dev.mysql.com/doc/refman/8.0/en ... ion_format
FORMAT
for that. For example: FORMAT(your_column, 2)
. This would format the number 1234567.8912
to 1,234,567.89
. You can also pass a third parameter to this function to specify locale.Reference: https://dev.mysql.com/doc/refman/8.0/en ... ion_format
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
- Need personalized consulting on your specific app and customizations? Book an online call with me here.
Re: Data Format not applied to Looking Field value
Thanks. It works with SELECT FORMAT...