How do I use an ENUM field type?

How do I use an ENUM field type?

Postby AndrewW » Thu Oct 04, 2012 3:46 pm

I've got a database field type that I want as a fixed enumerated data tyep. such that possible values are locked in the database as simple single char answers. Is this supported with nuBuilder?

e.g. I've got a field as "enum('Y','N')" is there a way to show is as a drop-list on the form for choice selection?
Or am I forced to use lists to accomplish this?

-A
AndrewW
 
Posts: 6
Joined: Thu Oct 04, 2012 3:06 pm

Re: How do I use an ENUM field type?

Postby admin » Thu Oct 04, 2012 4:28 pm

Andrew,

Create a Dropdown Object with the following SQL..

Code: Select all
SELECT sli_option, sli_description FROM zzsys_list WHERE sli_name = 'answer'


(This uses records added via the List Button on the Setup Tab)

Steven
admin
Site Admin
 
Posts: 3154
Joined: Mon Jun 15, 2009 9:53 am

Re: How do I use an ENUM field type?

Postby EcoReality » Fri Feb 17, 2017 10:34 am

Steve, I don't understand how your code sucks the values out of an ENUM and puts them in a dropdown.

I don't have a table called `zzsys_list`. Do I need to load the example to see it?

Here is what I've been trying to do, but it doesn't seem to work.

Thanks for any help you can offer!
:::: Jan Steinman EcoReality Co-op ::::
EcoReality
 
Posts: 26
Joined: Wed Feb 15, 2017 5:20 pm
Location: Salt Spring Island, British Columbia, Canada

Re: How do I use an ENUM field type?

Postby admin » Sun Feb 26, 2017 5:29 am

Jan,

What version are you using?

Steven
admin
Site Admin
 
Posts: 3154
Joined: Mon Jun 15, 2009 9:53 am

Re: How do I use an ENUM field type?

Postby EcoReality » Tue Feb 28, 2017 1:04 pm

admin wrote:What version are you using?

nuBuilder3

Jan
:::: Jan Steinman EcoReality Co-op ::::
EcoReality
 
Posts: 26
Joined: Wed Feb 15, 2017 5:20 pm
Location: Salt Spring Island, British Columbia, Canada

Re: How do I use an ENUM field type?

Postby admin » Mon Mar 20, 2017 1:48 am

Jan,

Sorry but this question is in the wrong spot.

Steven
admin
Site Admin
 
Posts: 3154
Joined: Mon Jun 15, 2009 9:53 am


Return to General