== IS_ONE_OF_EMPTY() Validator == This one has all properties of [wiki:IS_ONE_OF IS_ONE_OF] but one: it '''does not''' send back to the browser a '''potentially huge''' dropdown with all values.[[BR]] Instead, it creates the INPUT box which can carry the corresponding lookup id.[[BR]] And when the form gets sent back to the server, the content of this INPUT box gets validated on the server against the corresponding lookup table. '''How to use the IS_ONE_OF_EMPTY?''' '''In controller.''' Keep in mind that the corresponding model assumes ''default validator'' against the organisation_id. The working example is [http://bazaar.launchpad.net/~flavour/sahana/sahanapy-trunk/annotate/569/controllers/or.py controllers/or.py]:[[BR]] here the organisation_id is not mandatory, but if present, must be validated against the (large) organisation table. {{{ def office(): ... # the update forms are not ready. when they will - uncomment this and comment the next one #if request.args(0) in ('create','update'): if request.args(0) == 'create': db[table].organisation_id.requires = IS_NULL_OR(IS_ONE_OF_EMPTY(db, 'or_organisation.id')) ... }}} '''Autocomplete - in the view.''' And the complimentary view [http://bazaar.launchpad.net/~flavour/sahana/sahanapy-trunk/annotate/569/views/or/office_create.html or/office_create.html] {{{ }}}