Hi: New to Servoy - great product! Not sure if this is a bug/feature request, or I’m not understanding something…
Environment: Servoy Developer
Version R2 2.0 rc11-build 270
Java version 1.4.2-34 (Mac OS X). Repository is on local Firebird database.
I have a form that is connected to an external PostgreSQL database table. The table has a PostgreSQL column of type boolean that I need to have displayed and editable on the form.
I can’t display or edit this column in a Servoy form. I believe this is because the dataprovider for the boolean is cast as an integer in Servoy. The behavior I’ve gotten when trying several things has varied:
-
Nothing is displayed if field is set as a TEXT_FIELD. However, I was able to assign a valuelist with values ‘true’ and ‘false’ to the list and got that to display the proper value in the field. However, when I changed the valuelist to display ‘t’ and ‘f’ and then changed back, I have been unable to duplicate the behavior, and now nothing displays in the field. Changing the field display to COMBOBOX with the valuelist produced the following error when trying to display the form: WrappedException of java.lang.IllegalArgumentException: Cannot format given Object as a Number.
-
I have been unable to change the boolean field in the backend database. If I type ‘true’, ‘false’, ‘t’, or ‘f’, nothing happens (entry turns red). If I try a 1 or 0 in the field, I get the following error: java.sql.SQLException: ERROR: column “loc_from_site” is of type boolean but expression is of type integer
You will need to rewrite or cast the expression
How do I interact with a backend boolean column through Servoy?