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!
|
|
Build Recordset From Group SQL
Posted: 18 Nov 08 4:41 AM
|
Hi,
Recently I posted a query on how to extract to SQL from an account group but I have a further query off the back of this. I want to return a selection of fields based on the accountids return from a groups SQL statement. I can't use SELECT ACCOUNTID FROM (GROUPSQL) as there are issues with ORDER BY etc within the group SQL itself. Does anyone know of a quick way (in terms of execution time to return the recordset) to build a SQL statements that returns a selection of fields based on the SQL held within a group rather than returning the fields within the group itself.
Hope this makes sense.
Cheers Kevin |
|
|
|
Re: Build Recordset From Group SQL
Posted: 18 Nov 08 4:33 PM
|
Can you explain what you are trying to achieve? It seems a bit unusual and I can't quite imagine what the requirement is.
Can you manipulate the SQL string (ie remove the bits you don't want?) using standard string functions?
Phil |
|
|
|
Re: Build Recordset From Group SQL
Posted: 19 Nov 08 3:36 AM
|
Well I'm trying to produce a data grid output from a group of accounts but I want to be able to determine the layout for example I want to show the account name, account postalcode and account status but some groups may not have these fields in the layout. Chopping up the group SQL statement was an option but I was just wondering if there was a less messy way. |
|
|
|
Re: Build Recordset From Group SQL
Posted: 19 Nov 08 5:13 AM
|
I'm just not getting this! You want to create a toolbar button, or similar, which when clicked looks at the current group definition and then queries the db using that definition, returning the results (which they can already see in list view) to the user in a grid? Why?
Phil |
|
|
|
Re: Build Recordset From Group SQL
Posted: 19 Nov 08 5:17 AM
|
I'm running a process on the group and returning the accounts from the group with selected fields I wish to display along with the result of the process. |
|
|
|
Re: Build Recordset From Group SQL
Posted: 19 Nov 08 11:40 AM
|
Using the GetGroupID's API isn't all *that* messy, particularly if you avoid the excessive-query-length problem by dumping chunks of the results into a ListView or something like that, and just keeping tack of which "page" the user is on at any given time. But as far as slicing & dicing the group queries is concerned, I'm afraid there is no "less messy" way of rearranging the group layouts. I did that for one of my programs, LabelMagix (www.jh3.com/software/labelmagix.htm), and it definitely was NOT easy!
Try to look at the problem from the SLX developers' perspective - their big concern is to prevent people from manipulating the group queries in such a way as to circumvent ownership and field-level security. Anything they do to "open up" the SQL behind the group grids is a potential security hole, and from a sales perspective, security holes are far worse than creating additional inconveniences for coders and integrators. |
|
|
|