0 votes
in Rock by TinaStephens (8.6k points)
edited

The top block on this page https://my.ctk.church/manage-giving , called Welcome Card is supposed to show YTD giving but shows overall amount instead. I have it commented out until it's fixed.

<h3><b>Total Giving YTD: {{ totalGiving | FormatAsCurrency }}</b> </h3>

Asana: https://app.asana.com/0/1203477406084155/1204139983695491/f

1 Answer

0 votes
by MarkLee (8.3k points)
edited
 
Best answer

Ttere is a subtle issue with the entity query.

TransactionTypeValueId == 53 && TransactionDateTime >= "{{january}}" && TransactionDateTime < "{{nextJan}}" && ({{qry}})

{{qry}} contains several || (or) conditions. The lava engine doesn't interpret this as expected. The documentation states that any || should come before any && and.

Changing the query to:

{{qry}} && TransactionTypeValueId == 53 && TransactionDateTime >= "{{january}}" && TransactionDateTime < "{{nextJan}}

Fixes the issue.

Additionally wrapping operations in parenthesis doesn't appear to work in entity commands. So unfortunately, ({{qry}}) is equivalent to {{qry}}

*Note to anyone who is confused by what the value of qry. It is a generated list of person alias id boolean operands. An example value might be:

PersonAliasId == 123 || PersonAliasId == 321 || PersonAliasId == 132 
Welcome! Here you can ask questions and receive answers (hopefully) from other members of our team.
...