Re: [web2py] Need help hiding inactive records from smartgrid

2011-12-21 Thread Jim Steil
Right, but you can pass a query along in the constraints argument. Here is a sample pulled from one of my apps: # Build query if searchText and searchText .strip() != '': queries.append(db.asset.description.contains(searchText)) if assetTypeId and assetTypeId > 0: q

[web2py] Need help hiding inactive records from smartgrid

2011-12-21 Thread Cliff
In business applications it is generally a bad idea to delete records of purchases, sales, etc. At the same time you want indexes to include records of active things, such as active customers. A simple way to manage this requirement is to use an is_active boolean field. Then in your index functi