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!
|
|
Groups
Posted: 31 Jul 06 2:21 PM
|
fiogf49gjkf0d A request has been brought to my attention that has me stumped. They need a group to display all open opportunities that (for a lack of a better term) are grouped. ex. An opp has 5 products totaling $500.
Account | ProductGroup | Opp description | Item Potential | Opp Potential xyz | software | ver1 to ver2 upgrade | 100.00 | 500.00 xyz | software | ver1 to ver2 upgrade | 100.00 | 500.00 xyz | hardware | ver1 to ver2 upgrade | 100.00 | 500.00 xyz | hardware | ver1 to ver2 upgrade | 100.00 | 500.00 xyz | cable | ver1 to ver2 upgrade | 100.00 | 500.00
This would display in the group as
Account | ProductGroup | description | Item Potential | Opp Potential xyz | software | ver1 to ver2 upgrade | 200.00 | 500.00 xyz | hardware | ver1 to ver2 upgrade | 200.00 | 500.00 xyz | cable | ver1 to ver2 upgrade | 100.00 | 500.00
And most importantly the Item Potential taken from the ext price will totaled based on the grouped ProductGroup.
Is this posible with the Groups in the Sales Client? |
|
|
|
Re: Groups
Posted: 31 Jul 06 3:29 PM
|
fiogf49gjkf0d I would say no. Groups look at the raw record data so if there is 2 records that correspond to xyz | software | ver 1 to ver2 upgrade then you're going to get 2 entries in the group.
What you're asking for is to combine every record where Account, ProductGroup, and Description match then add up the item potential but leave the opportunity potential. A group doesn't have that flexibility to stop the recordset mid-stream and do this kind of processing. A grid on the other hand can by parsing the entire recordset before any data is displayed then binding to only the combined recordset output you're looking for. You can use footer rows to give totals which is impossible with groups. If "Export to Excel" is your only reasoning for this to be a group you can easily use the same functionality with grids. The Export_Grid_RS_To_Excel VBScript plugin is what you would use.
The only downside to any of this type of work is that it tends to be highly customized and there is no way to have this in a group so that you can make changes on the fly. You can get around that by providing a little flexibility on the front end but it'll probably never be as easy as making a change to a group and re-releasing. |
|
|
|
Re: Groups
Posted: 31 Jul 06 3:45 PM
|
fiogf49gjkf0d Well you could do it easy enough in a SQL view. It's been a few versions since I tried using a view for a group, so I am not sure if you can do that now or not (worth checking since that is the only way you'd be able to pull this off AFAIK) |
|
|
| |
| |
|
Re: Groups
Posted: 31 Jul 06 4:18 PM
|
fiogf49gjkf0d To clarify a few point so I understand correctly.
Build sql view - as in create a sql view using the administrator sql tool? Am I correct that this would not be available to the remote users? If this works do I invite you for some stew Doc?
|
|
|
|
Re: Groups
Posted: 31 Jul 06 4:27 PM
|
fiogf49gjkf0d Interesting approach. How do you get the view to sync out the the remotes? |
|
|
|
Re: Groups
Posted: 31 Jul 06 5:43 PM
|
fiogf49gjkf0d IIRC, "create view" statements do sync, however, you will have problems since many views will not parse by the SLX Provider.
Here's how I do it (in a very overly simplified nutshell).
1) Create a table to contain the text for your views and add the text for your view(s) to it. 2) Create a script that runs through that table and executes the statement via a native connection (for remote databases only). Then tie that to the DBOpen event so it runs when SLX is opened and then creates all the views if they are missing in the local database.
I've done it that way many times and works great (also to get stored procs out to remotes) |
|
|
|
Re: Groups
Posted: 31 Jul 06 6:28 PM
|
fiogf49gjkf0d DBOpen? Isn't it better to use the Application_Logon global script routine instead? I thought DBOpen was prone to not quite work 100% reliably.
Wouldn't triggers benefit from this method? I thought their problem was they don't synchronize though there may be a bigger issue keeping them from behaving nicely. |
|
|
|