eric.dizon
17th September 2014, 17:45
In a multi-occurrence form I understand there are two ways to calculate the total of field.

One is sum up the database values upfront using a select statement this is ok but this not dynamic if the user does an inline filter.

The other one is to iterate the occurrences in screen. I would prefer this because it can adopt when a user does a filter and updates the session to the proper values.

But what I need as well is for it to show the total of the session even the records or showing or not on the page without using select statement. Is this possible to iterate on all the records of a session showing or not to come up with the proper values but be dynamic enough so when the user does a filter it will total the results also even they don't fit on the screen's current page?


for i = 1 to filled.occ
do.occ.without.update(i,get.grid.totals)
endfor

mark_h
17th September 2014, 19:53
Never really thought about this - I usually have a query to get the totals. Seems to me someone posted something along these lines in the last couple of years. So far my searchs have not found anything.

mark_h
17th September 2014, 20:03
FOund the thread I was thinking about - http://www.baanboard.com/baanboard/showthread.php?t=64628 , but this had to do with records selected and scrolled off the screen. Not sure something like that would work.

eric.dizon
17th September 2014, 20:05
Yes , I have been looking as well but I cannot find out if this even possible or not or there out be an attribute out there like filled.occ, fattr.occurnr to satisfy the requirement.
Another possible idea is retrieving what the user is using for filter and try to concatenate that in your select statement.

JaapJD
17th September 2014, 23:07
I think the function sum.records.in.view() will be helpful for your requirement. It is available as of FP7 tools. Check https://www.inforxtreme.com/espublic/EN/AnswerLinkDotNet/SoHo/Solutions/SoHoViewSolution.aspx?SolutionID=1370753 or a recent programmers manual.

eric.dizon
17th September 2014, 23:12
Thanks Jaap. Where can I get the latest programmers manual for ERP LN FP7?

JaapJD
18th September 2014, 09:51
https://www.inforxtreme.com/espublic/EN/AnswerLinkDotNet/SoHo/Solutions/SoHoViewSolution.aspx?SolutionID=22924522