Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

How do I use an ENUM field type?

Post Reply
AndrewW
Posts: 6
Joined: Thu Oct 04, 2012 7:36 am

How do I use an ENUM field type?

Unread post by AndrewW »

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
admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

Re: How do I use an ENUM field type?

Unread post by admin »

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
EcoReality
Posts: 26
Joined: Wed Feb 15, 2017 8:50 am
Location: Salt Spring Island, British Columbia, Canada
Contact:

Re: How do I use an ENUM field type?

Unread post by EcoReality »

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 ::::
admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

Re: How do I use an ENUM field type?

Unread post by admin »

Jan,

What version are you using?

Steven
EcoReality
Posts: 26
Joined: Wed Feb 15, 2017 8:50 am
Location: Salt Spring Island, British Columbia, Canada
Contact:

Re: How do I use an ENUM field type?

Unread post by EcoReality »

admin wrote:What version are you using?
nuBuilder3

Jan
:::: Jan Steinman EcoReality Co-op ::::
admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

Re: How do I use an ENUM field type?

Unread post by admin »

Jan,

Sorry but this question is in the wrong spot.

Steven
Post Reply