Count all starred accounts

Hi,

I’m looking to count the number of starred accounts active on a client file, to use this as an insight for reporting purposes.

From some research on the forums I’ve compiled the following code, but it is currently not capturing any accounts. This could be an issue with the range I’ve selected but I’m not certain.

Here is the code I have used:

{% assign standard_range = "1_9" %}
{% assign starred_range = period.accounts[standard_range].starred %}
|{% input custom.accounts.numbers as:account_collection range:starred_range accounts_var:accounts_all %}
|{{ accounts_all.count }} 

It generates on the template as below:
image

I would be grateful for any assistance, apologies if this is a simple fix but I am not experienced in liquid coding!

As a separate note, I am looking to do the same for the number of adjustments posted in a period and any suggestions would be very helpful.

Thanks,

Mike

Hi @Mike.davis

I see you created an input where users would have to select the accounts manually.
If you just need to know how many starred accounts there are in the current period, you could use the following liquid code:

{% assign starred_accounts = period.accounts.starred %}
{% assign starred_accounts_count = starred_accounts.count %}

To access this number through Insights, you’ll have to then create a result on your reconciliation text. For example:

{% result "number_of_starred_accounts_in_period" starred_accounts_count %}

To get the total number of adjustments made in Silverfin in a certain period, you can use:
(see: adjustments )

{% assign adjustments_count = period.adjustments.count %}

I hope this is what you were looking for,
kind regards

Romy