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:

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
Hi @Romy_Vermeeren
Thank you very much for this, I had some trouble with that exact code but it pointed me in the right direction.
For reference, and anyone looking to solve a similar issue, the code I used in the end is as follows:
|Starred Accounts
|{{ period.accounts.starred.count }} {% result "number_of_starred_accounts_in_period" period.accounts.starred.count %}
{% newline %}
|Starred Reconciliations (incl planning & completion)
|{{ period.reconciliations.starred.count }} {% result "number_of_starred_reconciliations_in_period" period.reconciliations.starred.count %}
{% newline %}
|Adjustments on file
|{{ period.adjustments.count }} {% result "number_of_adjustments_in_period" period.adjustments.count %}
{% newline %}
Thanks,
Mike