totc()
Alan Grinberg
omnis at alangrinberg.com
Sat Dec 13 13:46:41 EST 2014
The "c" on totc basically says to do the calculations before running the total.
Not sure of your data definitions, but &InvTotal>=0) might be redundant and not needed.
(short lecture)
- Alan
----------------------------------------------------
Alan Grinberg
AG Systems/ZOO-INK
San Francisco, CA
www.zoo-ink.com
www.perfectfit.net
alan at perfectfit.net
----------------------------------------------------
On Dec 12, 2014, at 10:06 AM, Daniel Sananes wrote:
> Hi again,
>
>
>
> Wonder if someone can explain why these two present the same result. I just
> copied these from codes in an omnis7-application.
>
> I do not understand how the longer totc()-expression understands itself.
>
> Calculate Amount as
> totc((InvAmount)*(InvType='F'&(InvAmount>=0&InvTotal>=0)))
>
> Calculate Amount as tot(InvAmount)
>
> Does the (InvType='F'&(InvAmount>=0&InvTotal>=0))-expression really selects
> the correct lines. Obviously it does. But how?
>
> And how does InvAmount multiplied by the expression work. I don't understand
> the logic.
>
>
>
> The second calculation is from a list which was merged with
> InvType='F'&InvAmount>=0&InvTotal>=0 for testing the correctness of it all.
>
>
>
> Hope someone has the good heart to lecture me!
>
>
>
> Regards
>
> Daniel
>
>
>
>
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list