back to top

Filtering a Detail List in Creatio (formerly bpm’online)

Like any data in Creatio, a detail list is based on an EntitySchemaQuery. Like any EntitySchemaQuery, you can add filters to limit the data. We can apply filters to the ESQ for a detail list as well so we can filter the results via code. For example, let’s say we have a detail that has items that represent actions a user needs to take and once complete we don’t want to see them in the list anymore, or date-based records that we don’t want showing once the date has passed. This is an easy task to accomplish.

When you add a detail to a page, there’s an entry added to the details section of the page. It looks something like this:

details: /**SCHEMA_DETAILS*/{
    "UsrSchema02c75cecDetail9906b620": {
        "schemaName": "UsrSchema02c75cecDetail",
        "entitySchemaName": "UsrCurrentActions",
        "filter": {
            "detailColumn": "UsrAccount",
            "masterColumn": "Id"
        }
    }
}

We’ll say that this detail is for an object named UsrCurrentAction that is related to an account and we have a boolean column named UsrComplete on the records in this detail. When this value is true, we no longer want the records to appear in our detail list. Our first step is to add a filterMethod to the detail section we saw above with the name of the function we’ll create to supply the filters. With the addition it will look like this:

details: /**SCHEMA_DETAILS*/{
    "UsrSchema02c75cecDetail9906b620": {
        "schemaName": "UsrSchema02c75cecDetail",
        "entitySchemaName": "UsrCurrentAction",
        "filter": {
            "detailColumn": "UsrAccount",
            "masterColumn": "Id"
        },
        "filterMethod": "getCurrentActionsFilter"
    }
}

We’ve added a filter method named getCurrentActionsFilter, however, this can be named whatever we want. This will be the function name we’ll create that will return the filters for the detail. Note, at this point we could remove the “filter” property with detailColumn and masterColumn, if wanted (it doesn’t harm to leave them there, but they won’t be used anymore with the filterMethod present). When we add a detail to a page, we wire it up by selecting a master and detail column to match up. This is essentially creating a filter for us that tells the data how to link up to the page we’re on – so it shows the right data for the record. We are going to be replacing that with our own filter(s). This is important to understand because we’ll need to be sure to include this filter that relates the detail data to the parent record of the page we’re on as well. So, in the scenario of only showing data where our UsrComplete column is false, we’ll also need to include a filter where the account lookup on our detail object matches the current account’s Id. Our filter method will look like this:

getCurrentActionsFilter: function() {
	var filterGroup = new Terrasoft.createFilterGroup();
	filterGroup.logicalOperation = Terrasoft.LogicalOperatorType.AND;
	// filter to link to current account
	filterGroup.add(
		"AccountFilter",
		Terrasoft.createColumnFilterWithParameter(
			Terrasoft.ComparisonType.EQUAL,
			"UsrAccount",
			this.get("Id")
		)
	);
	// filter to only include where UsrComplete is false
	filterGroup.add(
		"NotCompleteFilter",
		Terrasoft.createColumnFilterWithParameter(
			Terrasoft.ComparisonType.EQUAL,
			"UsrComplete",
			false
		)
	);
	return filterGroup;
}

Now, with this code in place, if a record in our detail gets the UsrComplete column checked (set to true), it will disappear from our list.

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Ryan Farley
Ryan Farleyhttps://customerfx.com/article/author/ryanfarley/
Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

AI Readiness Checklist for CRM Teams: Is Your CRM System Ready for AI?

Before using AI in Creatio, make sure your CRM data, users, processes, and automation foundation are ready. Use this practical AI readiness checklist for CRM teams.

Build Your Creatio AI Skills with the 2026 AI Summer Program

Join Creatio’s free 2026 AI Summer Program to learn how to identify, build, deploy, and manage AI agents.

Creatio 10x Is Coming: Join the Webinar to Explore the Future of AI-Native CRM

Learn what's new in Creatio 10x and how AI-native CRM, agentic AI, and no-code automation are shaping the future of customer relationship management. Join the upcoming webinar and discover what's next.

Creatio Unlimited Pricing Explained: AI Packages, Costs, Pros & Cons

Learn what Creatio’s new Unlimited pricing model includes, what it doesn’t include, how AI Action packages work, and the pros and cons for businesses evaluating Creatio.

Using the AI Prompt to Create Dynamic Folders in Creatio

Using Creatio's AI prompt to create the filter for a dynamic folder works best if you specifically ask for that, and if you are as clear and direct as possible about the filtering, conditions.

Related Articles

AI Readiness Checklist for CRM Teams: Is Your CRM System Ready for AI?

Before using AI in Creatio, make sure your CRM data, users, processes, and automation foundation are ready. Use this practical AI readiness checklist for CRM teams.

Build Your Creatio AI Skills with the 2026 AI Summer Program

Join Creatio’s free 2026 AI Summer Program to learn how to identify, build, deploy, and manage AI agents.

Creatio 10x Is Coming: Join the Webinar to Explore the Future of AI-Native CRM

Learn what's new in Creatio 10x and how AI-native CRM, agentic AI, and no-code automation are shaping the future of customer relationship management. Join the upcoming webinar and discover what's next.

Creatio Unlimited Pricing Explained: AI Packages, Costs, Pros & Cons

Learn what Creatio’s new Unlimited pricing model includes, what it doesn’t include, how AI Action packages work, and the pros and cons for businesses evaluating Creatio.

Related Videos