What is the best way to have "smart groups"?

Discussion created by vavo on May 27, 2014
Latest reply on May 29, 2014 by vavo



I am about to create a system that requires "smart groups", and by that I dont mean groups of smart people - even though that will help any business - but groups of contacts/ companies that are based on a search and auto update. For example a group "Active Members in Texas" should always contain all records meeting those criteria.


One way to do that is of course use the "Saved Functions"but I would much prefer it to be scripted so I can build it into the regular user interface. So far I have not found a way to use this function in scripts, I guess it does not exist.


The other way, and that is what I am leaning towards is do the following:


- Let the user define criteria through a custom "Create Smart Group" interface.

- The criteria get saved in a table "GROUPS".

- A function creates a SQL query returning the id's based on those criteria.

- Use GoTo Related Record to show the foundset/ show in virtual list if results are from different tables.


It is a bit of scripting up front but it would do what I need and actually provide quite bit of flexibilty. I have used something similar to filter portals and it works beautifully!



Now I am curious if anybody has done it this way, differently, if there is a better way etc.!