NULL in Databasejoin element? [SOLVED]

pcom

New Member
I have got a 0-1 relationship represented as a databasejoin element. As this relationship is optional, I would like the default value to be NULL, or at least an option to insert NULL into the database.

However, using the default tab while editing the element, and setting Value of 'Please select' option to NULL it tries to insert the string 'NULL', which breaks my foreign key constraint. I would like it to be either INT (referring to a PK) or NULL (the value, not the string).

Is this possible to accomplish?

I could work around this by adding a dummy entry to the table I'm linking to, with an entry that represents a non-relationship, but in my design it feels better to use NULL values in the database.

Thanks :)
 
Of course!
Can't believe I didn't think of that as I'm making extensive use of evaluated fields in other elements. Slow day :)

Thanks a lot.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top