Headed List Box, Totals line

Alan Grinberg omnis at alangrinberg.com
Fri Aug 24 11:09:24 EDT 2018


Hi Mike,

You can calculate your “total” on a different method line with a different variable (newVar), and plug that in to the $footer.$assign(row(newVar))


We control appearance with something like this:

			If tempTotal<0
				Calculate columnList as con(columnList,styleFrontNegString,'jst(',tempTotal,',',kSq,'N',_displayDecimalPlaces,commaChar,kSq,')',styleBackString)
			Else
				If tempTotal=0&len(pZeroAlternate)
					Calculate columnList as con(columnList,styleFrontString,'jst(',kSq,pZeroAlternate,kSq,',',kSq,'',_displayDecimalPlaces,'',kSq,')',styleBackString)
				Else
					Calculate columnList as con(columnList,styleFrontString,'jst(',tempTotal,',',kSq,'N',_displayDecimalPlaces,commaChar,kSq,')',styleBackString)
				End If
			End If

Hope that helps.

----------------------------------------------------
Alan Grinberg
AG Systems/ZOO-INK
----------------------------------------------------




> On Aug 24, 2018, at 3:06 AM, Michael Matthews via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
> 
> Hello All,
> 
> Following on from this topic of $footer in Headed lists, how do you use $total on a calculated column in a list?
> 
> I have a column displayed that uses a pick() statement, for debits and credits.  So either Col4 or Col5 have data which comes from the same field, but depends on another field for appearance.
> 
>      ;  Total of the values in a column of the list.
>      Calculate Total as iList.$cols.ColName.$total()
> 
> $total as far as I can see uses a strict col name, and I don’t want to loop through the list if possible.
> 
> Hmmm….
> 
> Mike
> 
> 
> 
> 
> <http://www.lineal.co.uk/shoretel/> <http://www.lineal.co.uk/shoretel/>
> 
>> On 15 Aug 2018, at 09:38, Alain Stouder Omnis <omnis at smartway.ch> wrote:
>> 
>> $cinst.$objs.hlbExternals.$footer.$assign(row(‘Total’,12000))
>> 
>>> On 15 Aug 2018, at 08:36, Alan Grinberg <omnis at alangrinberg.com> wrote:
>>> 
>>> Thanks for your hints, everyone.
>>> 
>>> I am stumped - can not get the totals to display, although $hidefooter is kFalse.
>>> I have found no documentation in the Omnis Manuals on this.
>>> 
>>> I have tried variations on this, in the construct of the window that has the list:
>>> 
>>> Do iList.$define(#1,#2)
>>> Do iList.$add(4,8)
>>> Do iList.$add(1,7)
>>> Do iList.$add(3,2)
>>> 
>>> Calculate iTotal1 as iList.$cols.#1.$total()
>>> Calculate iTotal2 as iList.$cols.#2.$total()
>>> 
>>> Do $cwind.$objs.MyList.$footer.$assign(iRow(iTotal1,iTotal2))
>>> 
>>> 
>>> What am I doing wrong?
>>> 
>>> RE: Euromnis
>>> Wish I could attend. It’s a bit far and expensive from San Francisco.
>>> 
>>> ----------------------------------------------------
>>> Alan Grinberg
>>> AG Systems/ZOO-INK
>>> San Francisco, CA 
>>> 
>>> www.zoo-ink.com <applewebdata://2F51DFE8-308C-47D7-A128-F2D7442B5DF5>
>>> www.perfectfit.net
>>> alan at perfectfit.net
>>> ----------------------------------------------------
>>> 
>>> 
>>> 
>>> 
>>>> On Aug 14, 2018, at 2:43 PM, Andrew Pavey <andrew at spelean.com.au> wrote:
>>>> 
>>>> The $columnames is the same format as the main list, you don't need to change anything, calculate each column 'total' as you see fit and put it in the row in the appropriate column.  You are not restricted to totals, you can calculate totals 'only for selected lines', or an average etc etc.
>>>> It's quite flexible
>>>> 
>>>> Andrew Pavey
>>>> 
>>>> PS my thanks to Bob for working on this shortly after the ownership change over. I had asked (nicely) at lunch several Euromnis' before but Bob was restricted by the previous ownership.
>>>> 
>>>> And that's another benefit of attending Euromnis, you get to meet and talk to the folks from the mother ship.
>>>> 
>>>> At 10:17 PM +0100 14/8/18, Phil \(OmnisList\) via omnisdev-en wrote:
>>>> 
>>>>> So, its just a set of values for a footer, no calculations?
>>>>> 
>>>>> regards
>>>>> Phil Potter
>>>>> Based in Chester in the UK.
>>>>> 
>>>>> On 14/08/2018 19:04, EurOmnis 2018 wrote:
>>>>>> Hello Alan,
>>>>>> 
>>>>>> Yes it is done.  Look for property $hidefooter and set it to kFalse which then turns ON footers.
>>>>>> 
>>>>>> Then apply the total types as a calculation:
>>>>>> $cobj.$footer.$assign(row('',lvValueTotal))
>>>>>> 
>>>>>> This was asked for Andrew Pavey while at EurOmnis 2016 in Tuscany, a very clever ask.
>>>>> _____________________________________________________________
>>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>>>> 
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>>> 
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>>> 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 




More information about the omnisdev-en mailing list