Subject Re: [Firebird-general] Dropdown list for variable domain
Author Robert Ritter
Thanks but I guess it wasn't to clear what I need. Say I have a field named OBSTRUCTIONS and the valid entries are "TREES" "TOWER" "BUILDING" "NONE" and "OTHER". I can set constraints to limit input to this field to these values OK but I also need to have a drop down list for the user to choose from. Otherwise how would he know what to enter. Also I don't want the user to type the entry, just pick it from a list. This is pretty important to my app and seems like something the a db system would support. Like I said in my earlier message Firebird does exactly what I need with the drop down list of available domains. Thanks again. Bob Ritter

Milan Babuskov <milanb@...> wrote:
brcr11 wrote:
> The "Domain" field in the form for defining table entries has a drop
> down list of the available domains including the "stock" and user
> defined domains. I need to supply a similar ability to my table update
> screens to produce a drop down of available valid entries for my table
> fields.
>
> I'll bet it's easy once you know how. Any assistance is greatly
> appreciated.

You can read domain names from systems table RDB$FIELDS. Use a query like
this, and populate dropdown-list with it:

select f.rdb$field_name
from rdb$fields f
join rdb$types t on f.rdb$field_type=t.rdb$type
where t.rdb$field_name='RDB$FIELD_TYPE' order by 1;

HTH

--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org




Community email addresses:
Post message: Firebird-general@yahoogroups.com
Subscribe: Firebird-general-subscribe@yahoogroups.com
Unsubscribe: Firebird-general-unsubscribe@yahoogroups.com
List owner: Firebird-general-owner@yahoogroups.com

Shortcut URL to this page:
http://www.yahoogroups.com/community/Firebird-general
Yahoo! Groups Links










---------------------------------
Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun.

[Non-text portions of this message have been removed]