Re: Array Summary Sum Utility Method

2017-06-22 Thread David Adams via 4D_Tech
> Adams banging the drum... You know that guy, the one on the bus that no one will sit next to? Just saying. I'm given to enthusiasms. But seriously, I've used DataGrid off-and-on for years and it's proven to a be a great help in a lot of situations.

Re: Array Summary Sum Utility Method

2017-06-22 Thread Kirk Brooks via 4D_Tech
Sannyasin, Ok - between your suggestion and Adams banging the drum I'm going to DL DataGrid and give it whirl - probably this weekend. Just from the website it does look pretty cool. On Thu, Jun 22, 2017 at 11:40 AM, Sannyasin Siddhanathaswami via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Aloha

Re: Array Summary Sum Utility Method

2017-06-22 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha Nigel! Very interesting. I really haven’t used 2D arrays, I guess in part because I didn’t see a use. Summing a row of a 2D array is very slick. Thank you so much. I ended up just using sets and looping through each unique ID to build the summary array. Sannyasin Siddhanathaswami On

Re: Array Summary Sum Utility Method

2017-06-22 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha Kirk! This is an awesome tip that I will use! In this case, I’m currently using objects/json to output reports and lists to DataTables (www.datatables.net). I’m really impressed with DataTables. I’m getting into using objects more and more, and love them. Sannyasin Siddhanathaswami On

Re: Array Summary Sum Utility Method

2017-06-21 Thread John DeSoi via 4D_Tech
> On Jun 21, 2017, at 2:59 AM, Nigel Greenlee via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > You don’t say if you are displaying these arrays on screen-obviously the 2D > arrays can’t be displayed on screen. Each array of a 2D array can be a column in a listbox. John DeSoi, Ph.D.

Re: Array Summary Sum Utility Method

2017-06-21 Thread Nigel Greenlee via 4D_Tech
Sannyassin Surely here you could be utilizing 2D arrays? e.g Array (aInvoices)-1D array (aInvoiceItems)-1D array (ainvoiceValue)-1D Array (ainvoiceItemNumbers)-2D)-on row per invoice one column per item array (ainvoiceitemDescription)-2D Ditto Array(aInvoiceItemQuantitySold)-2D Ditto

Re: Array Summary Sum Utility Method

2017-06-20 Thread Kirk Brooks via 4D_Tech
Sannyasin, The simple answer to the situation you describe is to loop through the records and build the arrays. I seem to recall you're working with v15+, so with that in mind here's how I'm handling these sorts of situations these days. 1) make an object array of each record. Depending on your

Array Summary Sum Utility Method

2017-06-20 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha, Does anyone have a utility method for summarizing (and summing) a set of arrays? For example with Invoice Line Items: Arrays: aItemNumbers aItemDescription aQuantitySold aExtendedSoldAmount Of course, with invoice line items there are multiple records with item numbers. I want a