top N rows

How to Display Top N Rows in Creatio Using Detail Area

Creatio has a quick and easy way to build a detail area (a.k.a. one-to-many relationship). You've probably already tried using the detail wizard and bpm'online auto-magically generated the functionality for you behind the scenes. So easy!

Let's take that one step further. Let's use Wonka Industries as our example. Wonka Industries wants to be able to see the top three years of revenue by each client to determine the company's sweetest years with that client. The revenue is tabulated and available in Creatio, but Wonka wants sales reps to see only a snapshot display of the top three years.

So, we must use a little bit of code to accomplish three tasks:

  1. Sort the data by revenue so the highest revenue years show up first
  2. Add a limit so only three revenue records show up at once
  3. Remove the "Load More" link so a user doesn’t think they need to click, therefore receiving unnecessary data

Let's start with the basics. Use the detail wizard and you will get a result like below. All the data associated with this account is displayed.

bpm'online top N rows example 1

Now we add the code to specify what we want to display:

And just like that, the detail area is filtered to display only the top three rows. 

bpm'online top N rows example 2

Allen D'Souza's picture
Allen D'Souza
Senior CRM Consultant

Allen is a senior CRM consultant at Technology Advisors Inc. He spends most of his time designing solutions using InforCRM, StarfishETL, and SQLServer. He also specializes in data migrations from-and-to Microsoft Dynamics CRM and Salesforce.com. Allen has been involved in large implementations for prominent players in the real estate, telecom, manufacturing, and publishing industries. Prior to working at Technology Advisors, Allen worked as a Microsoft application developer in the Accounting space. Outside of work, he likes to meditate, play his guitar, and eat chocolate.

Related Articles

March 16, 2020

Welcome to part two of our series on CRM selection. If you missed part one, we discussed sales features worth considering when searching for a CRM. You can read that post here. In part two, we’ll discuss the marketing features. I’ll begin by repeating my redundant (but important!) point about CRM selection: You should never choose a CRM based on features alone. Thoughtful strategic planning is essential for any successful CRM implementation. We’ll discuss strategic planning in another post, but if you’re unsure where to begin, reach out to a CRM consultant (like us!). A CRM consultant knows the questions to ask and the tasks to prioritize to help you select the best fitting CRM solution.

February 17, 2020

Sometimes small tweaks to how a field looks on a screen can make a big difference in usability and improve the quality of data captured. Adding field hints is one way to improve this usability in Creatio.