[ic] Adding Null to Select Box using mv_metadata?

David Kelly interchange-users@icdevgroup.org
Mon Nov 18 17:11:01 2002


On Tue, 19 Nov 2002 10:46 am, Mike Heins wrote:
> Quoting David Kelly (david@zeald.com):
> > On Mon, 18 Nov 2002 8:31 pm, Rene Hertell wrote:
> > > > I have a page that is using the table-editor tag to edit a number
> > > > of fields in the database. One of the fields is using a Select Box
> > > > to display a list of options that have been extracted from another
> > > > table in the database (using mv_metadata). I need to add a NULL
> > > > value to the select box so that on occasion the user can select a
> > > > NULL value from the dropdown. Has anyone ever done this before?
> > > > and if so could they point me to some docs, old mailing list/forum
> > > > posts or anything else that might help me get this going?
> > >
> > > I think that the nullselect filter is what you are looking for...
> >
> > Yeah I was thinking that too ... but I gave it a try and no joy?
> > Any other ideas?
>
> Are you *explicitly* trying to set a database NULL value? Hmm. IC's
> update_data routine can't do that; and it is not common, for this is the
> first time I have ever heard that desire.

I am wanting to allow the user to select some data from a drop-down box for 
the field.  But, occasionally the user doesn't want any data to be added to 
the field.  Unfortnately by default the drop down has the first record in the 
drop down selected and so the first value in the drop down is entered is in 
the field.   So the user is left with no way of adding NULL to the field.  

So essentailly my question is this.  Is there anyway to add a NULL (or even an 
empty string ("")) value to the drop down list (and have it so that this is 
selected by default) using table-editor and mv_metadata in 4.8.6?

Cheerio
-- 
David Kelly (Sv0rd)
Zeald Ltd
http://www.zeald.com