The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Temporary Dynamic Groups
Posted: 07 Aug 06 11:34 PM
|
fiogf49gjkf0d Is there a way to create a temporary group using code? I am trying to give my system users an option to create a temporary dynamic group by clicking a button on the toolbar. The group criteria would be loaded from a preset set of fields unique to each user stored on a table in the system. I would want this group to be deleted when the user signs out of the system. I can store the data and write the query for the group, but how do I implement this in code if possible to do????
Any ideas or comments greatly appreciated.... |
|
|
|
Re: Temporary Dynamic Groups
Posted: 08 Aug 06 12:52 AM
|
fiogf49gjkf0d There's very little in Application.BasicFunctions that deals with a group. The only one I know of that will let you create one on the fly is CreateAdHocGroup but I don't see anything that lets you modify the layout. SyncSalesLogix is an adhocgroup and the simplest definition is that it creates records in the adhocgroup table.
I don't think this is what you want but I don't think anything else will be it either. To my knowledge group SQL queries must be created and stored in the plugin. You may be able to manipulate the BLOB data directly but it's severely unsupported, not recommended, etc. You can probably get the desired result through another method like making the fields static but changing the data like the useroptions table.
If none of that works you could always just create a customization that builds and updates a datagrid at runtime. You can make a grid look like a group and even export to Excel. It's not quite the same but you run into limitations quick with groups and they're one area that has very little programmatic access to it. A grid is just as good but it isn't as easy to manipulate in client as groups are. |
|
|
|
Re: Temporary Dynamic Groups
Posted: 08 Aug 06 2:01 PM
|
fiogf49gjkf0d In 6.2.4 (not sure what version it was added)
Application.BasicFunctions.CreateTempGroup
Timmus |
|
|
|
Re: Temporary Dynamic Groups
Posted: 08 Aug 06 2:12 PM
|
fiogf49gjkf0d That one's been there since at least 6.x, probably goes back even further. I overlooked it when I was browsing the docs. Argh. |
|
|
|
Re: Temporary Dynamic Groups
Posted: 09 Aug 06 12:33 AM
|
fiogf49gjkf0d Do you know if the function will let you specify layout and is there any documentation out there for the function. I was able to find very little in the LAN dev ref manual. Have you used this function in application before? If so any advice you can give me on its use would be greatly appreciated.
Thanks
|
|
|
|
Re: Temporary Dynamic Groups
Posted: 09 Aug 06 10:26 AM
|
fiogf49gjkf0d No, that function will not allow you to specify the layout and at this time there are not any other API's for modifying a group layout at run-time.
I believe the temp group will use the layout from either the "All" or "Latest" groups (I forget which). |
|
|
|
Re: Temporary Dynamic Groups
Posted: 09 Aug 06 2:56 PM
|
fiogf49gjkf0d Lame. They're using an existing plugin and just changing the GroupSQL. ADO columns aren't so difficult that they couldn't just build the group at runtime but I suppose they chose speed (it'd take a while to debug, make sure it all functioned, etc) over usage.
Edit: That basically makes it useless. If we wanted to create an All/Latest group clone we could just do that and save the trouble. SLX should drop the group and just use a datagrid with a locked layout. MainView QuickFind seems to do this now and it would give some of us the programmatic access we want to make stuff like this possible. |
|
|
|