Document Templates, Tags and Levels

Contains tips for configurators working with Aware IM
Post Reply
kaygee1
Posts: 30
Joined: Tue Sep 22, 2015 11:43 pm

Document Templates, Tags and Levels

Post by kaygee1 »

I have an object called Claim. Each claim can have multiple transactions of various types, called Transaction, which has a TransactionType attribute.

I track all the Transactions within the Claim. So I have Claim.Transactions.

I want to produce an excel report with the various Claim attributes and a summation of the transaction amounts by TransactionType.

So for example, the excel report will have the following fields.
Claim #, Status, Description, Total Payments, Total Returns, Total Amount

So the tag I use in the excel spreadsheet is as follows
<<LIST_TABLE_START('Find Claim WHERE Claim.Program=Program')>><<Claim.ClaimNumber>>, <<Claim.Status>>,<<Claim.Description>>,<<SUM Claim.Transactions.Amount WHERE Claim.Transaction.TransactionType='Payment'>>,<<SUM Claim.Transactions.Amount WHERE Claim.Transaction.TransactionType='Return'>>,<<SUM Claim.Transactions.Amount>><<LIST_TABLE_END>>

I get an invalid tag expression. Is this because I'm going 3 levels down? (Claim.Transactions.Amount). If I can't do that, how would you advise doing it? I'm trying to avoid storing the values withing the Claim BO as my actual usage would require at least 12 different fields. I'd like to do this dynamically, is this possible?
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Document Templates, Tags and Levels

Post by customaware »

You should put each in a different cell I think.

A10 =
<<LIST_TABLE_START('Find Claim WHERE Claim.Program=Program')>><<Claim.ClaimNumber>>
B10=
<<Claim.Status>>
C10=
<<Claim.Description>>
D10=
<<SUM Claim.Transactions.Amount WHERE Claim.Transaction.TransactionType='Payment'>>
E10=
<<SUM Claim.Transactions.Amount WHERE Claim.Transaction.TransactionType='Return'>>
F10=
<<SUM Claim.Transactions.Amount>><<LIST_TABLE_END>>

Check out last weeks Webinar video on the Heidi's corner page at http://awareimdevelopers.com

You might also want to check our the 2016 Aware IM Developers International Conference http://awareimdevelopers.com/aidic
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
kaygee1
Posts: 30
Joined: Tue Sep 22, 2015 11:43 pm

Re: Document Templates, Tags and Levels

Post by kaygee1 »

I don't know if I can attend, would love to really be able to dig deep into this.

That being said, support gave me the answer on how to handle this.

<<SUM Transaction.Amount WHERE (Transaction IN Claim.Transaction)>>

Worked perfectly...
Post Reply