Re: Choose null on add3 popup [message #4048 is a reply to message #4047] |
Sat, 18 January 2014 06:15 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to previous message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
When a popup is called from an ADD3 screen you are supposed to set $settings['select_one']=FALSE so that the popup screen will allow you to make multiple selections. This is done by displaying the SELECT boxes as checkboxes. In this case the popup will remove the 'Choose Null' button. The ADD3 screen is used to maintain the contents of the link table in a many-to-many relationship, and it will take whatever is selected in the popup and add it to the link table. You either CHOOSE records in the popup or you CANCEL. Using CHOOSE NULL will attempt to add a record with a NULL value, which produces the error you encountered.
When a popup is called from other screens then the default value of $settings['select_one'] is TRUE, in which case the popup screen will show the SELECT boxes as radio buttons causing only a single selection to be possible. In these screens the popup is used to a supply a single value for a single field in the current database record, and this value may be set to an actual value or emptied with a NULL value.
I hope this makes it clear.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|