Lava Example - 61 | Rock Community

Lava Example - 78


Prompt

Create a list of all of the dates that Ted Decker has made a transaction.

Financial Transactions are tied to Person Aliases, and a person might have multiple aliases, so to get a complete list we'll need to use an expression.

So you don't have to go hunting through the Model Map and learn how Financial Transactions work, here is a partial view of what you have access to in a FinancialTransaction record:

{
    "TransactionDateTime": "8/6/2024 12:00:00 AM",
    "AuthorizedPersonAlias": {
        "Id": 22,
        "PersonId": 5,
        "Person": {
            "Id": 5,
            "NickName": "Ted",
            "LastName": "Decker",
            "GivingId": "G78"
        }
    },
    "TransactionDetails": [
        {
            "Amount": 185.00,
            "FinancialAccountId": 1
        },
        {
            "Amount": 15.00,
            "FinancialAccountId": 2
        }
    ]
}
Note:
You don't have rights on this server to view these record types. So make sure to disable security in your entity command.
Initial Code
{% financialtransaction %}
    <ul>
        <li></li>
    </ul>
{% endfinancialtransaction %}
Solution Lava
{% financialtransaction expression:'AuthorizedPersonAlias.PersonId == "5"' securityenabled:'false' %}
    <ul>
        {% for item in financialtransactionItems %}
            <li>{{ item.TransactionDateTime }}</li>
        {% endfor %}
    </ul>
{% endfinancialtransaction %}