Period drop

Video outline

What is the period drop?

  • The period drop is used to access a collection of data that exists in Silverfin database, using liquid
  • The period drop is used to access a group of period-specific data
  • The period drop is a so-called root drop
  • The period drop contains both methods as well as other drops

What data can we access via the period drop?

There are a number of important data elements we use to access via the periods drop. These can be categorized into the following important groups:

  • The accounts drop, which includes all financial data in Silverfin
  • Period characteristics, which are methods to access data which relate to this specific period in time, such as the year end date of the bookyear
  • Period-specific drops, which are collections of data attached to the current period, such as reconciliations, people, adjustments and calendar years within the current bookyear
  • There may be more data elements or groups which do not nicely fit in any one of these mentioned. Just keep in mind that most of the Silverfin data you are looking for, is likely to be found under the period drop

The period.accounts drop is probably the most important drop in Silverfin. It contains all accounts in the ledger of the current period, which have a non-zero value. The period.accounts drop yields a collection of objects called account drop. One account drop for one account contains a number of important methods, for which I refer to the documentation page. It is important to learn about these methods in order to be able to work in liquid effectively.

The period drop contains a number of useful methods itself, providing data such as the end date of the period, the end date of the bookyear, the starting date, or the name of the period.

These methods are especially of use in combination with navigating through periods, which I will explain in a few moments.

Here you can see how I can ask Silverfin to display the bookyear end date of the current period I am viewing, irrespective of whether I am in the first, last or any intermediate period within the bookyear.

The following code:

{{ period.year_end_date | date:"%d/%m/%Y" }}

Looks as follows in input: 31/12/2020

Most of the data to be found under the period drop, is found under another drop - I would like to call that a sub-drop but that is unofficial language.

Period.accounts actually also is a sub-drop but we treated that a little differently in this course.

Important other examples are period.reconciliations, period.people and period.adjustments which are shown here.

In this example I write an assign statement in order to draw the value of a custom variable, entered by a user, from another template and store it in a local variable. This local variable can be used for instance in a calculation.

Say that a reconciliation template which has the handle depreciation_table exists in my company.

Accessing the value of custom variable custom.depreciation.rate which is located in that reconciliation template would be done as shown here:

{% assign local_rate = period.reconciliations.depreciation_table.custom.depreciation.rate %}

Note that nothing is printed using this syntax only, but printing the local_rate variable will show its value as long as the custom variable I have accessed using the drop, is provided with a value by the user.

When using the period drop, you would be really limited by only being able to access data from the current period you are in.

Luckily it is possible to access each previous and subsequent period and bookyear and all data which is under these drops.

This is done using the syntax we see here, where minus_1p stands for: one period back in time and plus_5y stands for: 5 years forward in time.

Make sure to check whether a certain period exists before accessing data from it!

Conclusion

  • The period drop is a collection of data that contains period specific information
  • It is one of the root drops in Silverfin
  • The period drop contains both methods and other drops
  • Syntax exists to navigate through previous and subsequent periods, before accessing its methods and sub-drops