The simplest ways (not necessarily the best) are:

1)

db.object.oid.requires=IS_NULL_OR(IS_IN_DB(db,'object.id','%(name)s'))

or 2)

all trees have a root. Create a dummy root object.

Massimo

On Feb 23, 12:30 am, "[email protected]"
<[email protected]> wrote:
> I'm sorry, I don't think I'm making myself clear. The issue is not
> with setting up a hierarchy nor with traversing the hierarchy. The
> issue is with data entry.
>
> I want to enter the parent of my object from a pull-down list so that
> I don't accidentally select the wrong parent (by having to enter a
> meaningless number, oid, that corresponds to the parent object's
> record number). Instead, I want to enter the parent's name.
>
> However, if the object doesn't have a parent (root object), then the
> oid should be NULL or 0.
>
> How do I do this with validators?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to