Widget modelCount
The “Model Count” type of widget uses a specific function to process RecordSets of EveryDataStore.
This configuration of ModelCount widget should start with widget_modelcount_. At the end you can describe the configuration with any name you want e.g. widget_modelcount_members_count.
The parameters of widget_modelcount_ are:
Parameter |
Description |
---|---|
backgroundcolor |
Specifies the color of the widget via the HEX color code |
name |
Name of model |
fields |
Unique identification string of the fields as array to process |
filter |
Specifies a filter criterion for RecordSetItemData in JSON object format |
count_option |
sum or count. default is count |
suffix |
Specifies the appended icon to the end of the widget |
prefix |
Specifies the appended icon to the beginning of the widget |
New widgets of this type can be created by adding underscore and custom definition after any of above listed configurations, and then entering desired value for the configuration.
Example Count of Members
The “Members” widget shows the total active members of the current DataStore
{
"name":"Member",
"fields": ["FirstName"],
"filter": {"Active":"true","Email:StartsWith:not":"admin"},
"backgroundcolor": "orange ",
"prefix": "€ ",
"suffix":" ",
"count_option":"sum"
}