I have an Project Expenses app with two reference fields:
And two expenses fields:
Both Client 1 and Client 2 references to the same Client app. In Expenses 1 can be input expenses related to Client 1 (and same for Expenses 2/Client 2).
In my Client app I would like to sum all expenses related to the given client (across all Project Expenses) an my initial approach was:
@Sum of Expenses 1 + @Sum of Expenses 2
But since the clients sometimes end up in the Client 1 field and other times end up in the Client 2 field I need to know which Client field the reference came from and only sum the appropriate Expenses field. So the calculation I want is this:
@Sum of Expenses 1 (where the client is referenced in Client 1 field) + @Sum of Expenses 2 (where the client is referenced in Client 2 field)
Can this be done and how?
Please sign in to leave a comment.