Process calculation sum of all previous plus current

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Process calculation sum of all previous plus current

Post by swiftinitpvtltd »

I have a for loop process for a BO where I find items and for each item I calculate one column value.
That value equals one formula + all previous calculated values from the looped items based on date.
1
3 (1+2)
7(4+3)
15(7+8)
so 2 and 3 and 8 are calculated from formula and 1 and 4 and 7 are previous all values sum.
I tried to put it in a process in a loop but because of this and that it does not give me correct values.
I wanted to avoid stored proc and use process logic but its not working.

process 1
Find BO where value is undefined ORDER BY date1 ASC and then call second step process
4 items found

Process 2 BO is passed
BO .value=SUM BO .value where date1<BO.date1+myformula this just does not work
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Process calculation sum of all previous plus current

Post by customaware »

Use a Non Persistent BO with While Condition on the BO Rule....
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: Process calculation sum of all previous plus current

Post by swiftinitpvtltd »

Thank you!
Post Reply