Drops
Video outline
The root drops
When we want to access and use data from any of the three main data categories in liquid, we use so-called ‘drops’.
Company, period and user are called the ‘root’ drops. Specific data as well as all other drops can be found in either one of these root drops. It is important to check out the documentation site to view the full drops structure in Silverfin.
Drops
Some drops need to be accessed in a specific way. For instance, the reconciliation drop is found by iteration over the reconciliations collection, found using the reconciliations drop. The reconciliations drop is a part of the period drop.
In this example you can see how drops work in liquid. ‘Period’ gives us the root drop, while ‘reconciliations’ navigates to the reconciliations drop underneath it:
{% assign recons_collection = period.reconciliations %}
Taking the first item in the reconciliations collection, returns the reconciliation drop for that item:
{% assign recons_collection = period.reconciliations %}
{% assign first_recon = recons_collection.first %}
{{ first_recon.name }}
The ‘.name’ addition lets us print the name of a specific reconciliation. This will return the name of the first template in the reconciliations drop, which depends on the company file you are currently in.
Methods
The .name addition previously used is called a method. The specific data items stored in each drop can be obtained in liquid using methods.
For all methods per drop, please check out the developer documentation site. Checking out the different obtainable data elements probably gives you a better idea of how liquid can be used effectively in practice.
Conclusion
Data in the Silverfin database can be accessed via liquid using drops.
The company drop, period drop, and user drop are called the root drops.
Updated over 3 years ago