Search code examples
filemaker

How to format currency in Filemaker ExecuteSQL istruction?


there is a way to format currencies in the result of an ExecuteSQL?

Sql keyword "FORMAT" doesn't work.

the calculation is:

ExecuteSQL ( "

SELECT expenses.user, ' - € ', SUM(expenses.value) 
FROM expenses 
GROUP BY expenses.user"
;" " ; ¶  ) ;

my output is

Ray - € 10000.1
John - € 44926.97
Tim - € 315.88

I need to get

Ray - € 10.000,10
John - € 44.926,97
Tim - € 315,88

Solution

  • It is (sort of) possible to format a Number field, but not a sum - because an aggregate function cannot be used as an argument to other functions.

    However, you could process the query result and format the amounts using Filemaker's native functions. Or (probably simpler) use a summary field instead of ExecuteSQL().