Display total number of related records

The Related Records field in Kintone is a useful field that lists other records that match a given condition. However, the Related Records field does not state how many records it is listing - which may be difficult to count manually when there are many records listed.

This sample code does the counting for you, and displays the number in a Blank Space field of your App.
As shown in the image below, each record will display a different number for the total number of related records.

related1.PNG

Sample Image

related2.gif

Sample Code

Notes

Refer to the Tutorial page, on how to add scripts to your app.
This sample will only display the number - it will not store and save the total number in a field.
As of an update on December 13, 2018, this sample does take into account the "filter" option of the Related Records field.

Was this article helpful?
0 out of 0 found this helpful
Do you have any questions or issues related to this article?
Please share your views with us in the Community forums!