Dear team,
Is it possible to pass boolean attribute value from client into the DB function used in reference filter? It seems to me it does not work properly.
I have the filter expression like this:
"from MyClass where Id in (/( SELECT "Id" FROM "MyFunction" ('{client:MyBoolean}') )/)"
MyFunction is working properly - tested in PSQL and is available from CMDBuild. It returns different Id lists for 'true', 'false' and null input values. Returned Ids are regular Id values of MyClass records with Status = 'A'.
If I am in the form where the reference attribute is placed the reference list is empty independently on the MyBoolean attribut value. In the log there is inserted an error record like this:
SELECT ... WHERE "MyClass"."Id" IN (SELECT "Id" FROM "MyFunction" ('{client:MyBoolean}')) AND "MyClass"."Status" = ?) AS main ORDER BY "MyClass#Description" ASC, "_MyClass_Id"
LIMIT 500 OFFSET 0]; ERROR: invalid input syntax for type boolean: "{client:MyBoolean}"
Pozice: 619; nested exception is org.postgresql.util.PSQLException: ERROR: invalid input syntax for type boolean: "{client:MyBoolean}"
So it seems to me the expression {client:MyBoolean} is not replaced by the MyBoolean attribute value.
Can you help me with this issue?
Thanks in advance,
Jiří