Skip to main content

Count Derived Field

The count derived field allows you to get the count of any field. For instance, say, a Person has many addresses and you want the count of those addresses which are of type Permanent (Static/Dynamic Option) or Address of some specific city (static/dynamic or reference field) then you can apply this feature.

1. Create a Reference Field

Let's say you want to create a blog post with reviews and showcase their count. As per this use case create a Reference field.

DrapCode Builder Save Derived Field

2. Create a Static Field

As per this use case create a Static Option field.

DrapCode Builder Save Derived Field

Create a link between the reference and static fields by creating a Child Of field.

DrapCode Builder Save Derived Field

4. Create a Page

Go to Pages and create a page to display data. In this page drop a Data Table. Open its Settings and choose the Derived Fields.

DrapCode Builder Save Derived Field

5. Add Data to the Data Table

Open the Settings of the Data Table and choose from which collection you wnat to get data from, the field and the filters and then Save.

DrapCode Builder Save Derived Field

6. Create Data Count

Go back to the previous collection and click the Derived Fields tab. Here add the field for which you want to get the count and chhose Data - Count of Records and click Create.

DrapCode Builder Save Derived Field

7. Create an Event

Before viewing the final data you can create an event to save data with a button to click and access data from. For this go to Events and Add Event. Name the event. Then choose to save its data.

DrapCode Builder Save Derived Field

8. Preview the Changes

Click Preview and you would find the count of the chosen derived field.

DrapCode Builder Save Derived Field