02-16-2010 02:31 PM
Hi all. We are using SLX LAN v7.2.1
We have a form that has 2 drop downs: Customer Type and State
and a button labeled "CREATE GROUP"
I want to be able to create a group once the end user presses the button (myButton) based on the criteria the end user chose in the 2 drop down boxes.
For example, Customer Type = "UPS" and State = "CA"
Once the end user clicks the button it will display all the customers whose type = "UPS" and State = "CA".
Thank you in advance!
Solved! Go to Solution.
02-16-2010 04:11 PM
If it is sufficient for the group to be a list of matching Entities at that moment in time, then you can use APIs to create an adhoc group. An adhoc group is a list of specific entity records as defined by a list of EntityID values rather than the more common dynamic groups that function by doing live queries and applying criteria. You would execute a query based on the criteria, generate a list of EntityIds and use the API to create the group and populate the group members using your list.
You would effectively have a snapshot of Entities that matched that criteria at that specific point in time. While the adhoc group member list can be updated either manually or programatically, the adhoc group definition itself has no concept of criteria and thus no ability to auto-update.
SLX does not have an API for creating or modifying a dynamic group.
In the LAN client I believe there are two adhoc group creation options - create a permanent adhoc group using a given name, create a temp adhoc group; basically like a lookup results list.
02-17-2010 08:16 AM
I believe adhoc groups can be used for MailMerge in v7.2.1 - but running a quick check on your system is a good idea before writing the code to autmoate creation of adhoc groups.
To test, open a dynamic group, Ctrl-Click a few records from the group and then Right Click to save as adhoc Group.
Note that this is what you will be accomplishing via the adhoc group creation APIs.
Now use that adhoc Group in a MailMerge to confirm you can achieve your objective.