Thanks Anthony, that worked. For some reason lambdas still confuse me, I need to work on that.
In terms of the model I didn't show all the fields, there are mid block addresses as well. I am thinking the best way forward is to denormalize the road table into the address table and put the values directly in there. This part of the database is very static so I could keep the road table as a lookup for building new intersection and mid block address table entries with a custom form. In the rare event a road changes name an update query could take care of that. That would remove the recursive database lookup. This is an inventory of city infrastructure - traffic signals, pedestrian signals at mid block, radios etc. It is currently managed by spreadsheet which has its own set of little horrors such as several ways to represent 76 Avenue spawned by people typing things in. I have a lat long value pair to the address table and adding some code would weed out duplicate entries and coordinate lookup failures would prevent entry of impossible addresses. It might be time to look at the GIS extensions to PostgreSQL if this prototype gets wings. Thanks much for your help, Ron -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.