Total brain fart on my part. I just figured this out on my own ... yet again, but thanks for beating me to the punch, buddy. If google would only let me delete these stupid posts of mine it would save me the embarrassment.
On Jun 28, 12:36 pm, Thadeus Burgess <[email protected]> wrote: > IS_IN_DB(rows, '%(id)s', '%(name)s') > > -- > Thadeus > > > > On Mon, Jun 28, 2010 at 11:35 AM, Thadeus Burgess <[email protected]> > wrote: > > ids = [] > > names = [] > > for r in rows: > > ids.append(r.id) > > names.append(r.name) > > > db.table.multilist_field.requires=IS_IN_SET(ids, names) > > > -- > > Thadeus > > > On Mon, Jun 28, 2010 at 10:49 AM, weheh <[email protected]> wrote: > >> I have a multilist that I want to populate from db.table: > > >> rows=db(query).select(db.table.id,db.table.name) > > >> db.table.multilist_field.requires=IS_IN_SET( > >> [r.id for r in rows], > >> labels=[r.name for r in rows], > >> ) > > >> Is there a better, more efficient way to do this rather than having to > >> run through the rows list twice?- Hide quoted text - > > - Show quoted text -

