Anthony,

I don't want multiple values.  I just want one of those values.

Is IS_IN_SET the incorrect way to do what I want.

On Oct 10, 2:52 pm, Anthony <[email protected]> wrote:
> Since 'status' is a list:string field, why not set multiple=True?
>
> IS_IN_SET(..., multiple=True)
>
> Anthony
>
>
>
> On Monday, October 10, 2011 2:45:48 PM UTC-4, Cliff wrote:
>
> > This is the field def:
> > Field('status', 'list:string'),
>
> > then:
> > db.mytable.status.requires = IS_IN_SET(
> >      {'n': 'New', 'I':'In process', 'C':'Complete'},
> >     zero = 'Choose'
> > )
>
> > When editing, SQLFORM shows the zero choice when on opening.  The
> > choices display correctly and can be changed.
> > On the next go round, it shows the zero choice again.
>
> > When viewing the object (readonly=True), SQLFORM shows the dictionary
> > key, not the value.  In other words, it will pick up the 'C' rather
> > than showing 'Complete'
>
> > I don't think it should matter, but because I'm using a generic form I
> > call SQLFORM this way:
>
> > return response.render(form=SQLFORM(db.mytable, request.args(0)),
> > h1="Edit")
>
> > Appadmin does the same thing and complains if I don't change the zero
> > value to a value in the dictionary.

Reply via email to