AnsweredAssumed Answered

Calculate total amount of operations where one value equals a record from list

Question asked by legolender on May 29, 2018
Latest reply on May 31, 2018 by philmodjunk

There are 2 tables: Operations and Organisations.

Operations includes fields: Sender, Receiver, Date, Type, Amount and calculated field Total Amount

Organisations includes fields: Name, Owner, Phone number and TaxID

Operations::sender is related to Organisations::name field. Details are shown on the picture.


The task: to find the total amount of operations with type "transfer" sent by all organisations belonging to "Owner 1"


I've tried to write a script to calculate total amount of operations with type "transfer", but have no idea how to choose only those operations, where sender is an organisation belonging to "Owner 1".


Enter Find Mode [Pause: Off]

Perform find [Restore]  // Find Records Operations::Type *"Transfer"

Set variable [$$total ; Value: GetSummary (Operations::Total Amount ; Operations::Total Amount )]