How to SUM child BO field into parent


Author
Message
Luiz Lima
Luiz Lima
StrataFrame User (214 reputation)StrataFrame User (214 reputation)StrataFrame User (214 reputation)StrataFrame User (214 reputation)StrataFrame User (214 reputation)StrataFrame User (214 reputation)StrataFrame User (214 reputation)StrataFrame User (214 reputation)StrataFrame User (214 reputation)
Group: Forum Members
Posts: 66, Visits: 724
Hi,

I´d like to sum a field value from a Child BO into its parent.
Is there a method to do that automatically?

Example:

BoOrders
field: orderTotalProduct

BoOrdersItens
field: orderItemTotalProduct

While the user input orderItemTotalProduct, the field orderTotalProduct would receive the sum from child (in the EditState set as Adding or Editing).

Tks Wink

Reply
Les Pinter
Les Pinter
StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)StrataFrame Team Member (95 reputation)
Group: Forum Members
Posts: 43, Visits: 213
Oi Luiz,



Good guess, but StrataFrame evolved not from Clarion, but from FoxPro, which had so many data handling features built in that it made .NET look a little weak. Luckily, Trent decided to fix what was wrong with it, and StrataFrame is the result.



Les
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Luiz Lima - 15 Years Ago
Trent L. Taylor - 15 Years Ago
Luiz Lima - 15 Years Ago
Greg McGuffey - 15 Years Ago
                     Luiz,

Greg is correct that it should work. If you have the...
Trent L. Taylor - 15 Years Ago
Edhy Rijo - 15 Years Ago
                         No problem :) Glad it came in handy!
Trent L. Taylor - 15 Years Ago
                             Trent and Greg, Tks a lot, but I still have doubts... i´m starter...
Luiz Lima - 15 Years Ago
                                 If you are saving it into the table, then the Compute method might not...
Greg McGuffey - 15 Years Ago
                                     Thanks for the sample, Greg.
Trent L. Taylor - 15 Years Ago
                                         Greg, tks a lot!!! It was really fantastic, my problem is solved!:D...
Luiz Lima - 15 Years Ago
                                             Oi Luiz,

Good guess, but StrataFrame evolved not from...
Les Pinter - 15 Years Ago
                                             Glad that sample helped!
Greg McGuffey - 15 Years Ago
Luiz Lima - 15 Years Ago
Dustin Taylor - 15 Years Ago
Luiz Lima - 15 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search