Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 18, 2025 
 
slxdeveloper.com Community Forums  
   
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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Can you show a count of a field in a grid?
Chip
Posts: 29
 
Can you show a count of a field in a grid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jan 08 12:49 PM
Sorry for posting 2 newbie questions close to gether but I have been working with a data grid and I have some fields that are showing up. I would like to take a count of records in a different table that relate to the record(s) show in the grid

example:

grid data from table a but would like to count the records that relate in b and show as a field in the grid

a.name b.recordcount ( count(*) )

hopes this makes sense.....
[Reply][Quote]
Mark Richardson
Posts: 25
 
Re: Can you show a count of a field in a grid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 08 2:14 AM
Hi Chip,

This can be done simply IF you do not have Remote Users to 'worry' about. You could also do this to include Remote Users but it would be a much more cumbersome build.

If you would like to know the simple, non-remote way, please let me know which version you are running first as this works best (most simply!) in versions 7.x - you can also do this for version 6.x but again, slightly more of a pain to do.

Mark
[Reply][Quote]
Walter Shpuntoff
Posts: 167
 
Re: Can you show a count of a field in a grid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 08 5:19 AM
If you are on 7.x, you could define a sql view and then use that as the basis for your grid.

Otherwise, you can build the grid at run time with code, and display the count like it's any other data field.

ws
[Reply][Quote]
Chip
Posts: 29
 
Re: Can you show a count of a field in a grid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 08 8:00 AM
We have no plans for remote users right now and we are using version 7.0.1.

Thanks for any help
[Reply][Quote]
Chip
Posts: 29
 
Re: Can you show a count of a field in a grid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 08 8:01 AM
We are suing Oracle so would we difine this view outside of the Database manager in SLX?
[Reply][Quote]
Mark Richardson
Posts: 25
 
Re: Can you show a count of a field in a grid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 08 8:11 AM
Hi Chip,

Indeed - you define this outside SLX (i'm using SQL but you'll get the gist...)

For instance, below is a SQL script to create a view:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE view [sysdba].[SALESORDER_COUNT] as
( SELECT accountid,count(salesorderid) as cnt FROM sysdba.SALESORDER
where status <> 'Cancelled' and ordertype = 'OR'
group by accountid )

This view simply has a column 'ACCOUNTID' and a count of SALESORDERS per account

Once the view has been created, you can use this in your standard forms / datagrids by joining (in this example ACCOUNT.ACCOUNTID left outer join to SALESORDER_COUNT.ACCOUNTID)

Let me know if this is not clear to you - otherwise, have fun !

Mark
[Reply][Quote]
Mark Richardson
Posts: 25
 
Re: Can you show a count of a field in a grid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jan 08 2:03 AM
Update...
I did ask about Remote Users on my earlier reply but I believe Remotes will also get the view too (obviously will only work as long as the views reference sync'd tables) so ignore that remark!
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/18/2025 8:03:23 AM