1. Home
  2. Docs
  3. Flexie CRM Methods
  4. findMany method

findMany method

Method

findMany — finds records on a specific entity by filtering with a Field Alias

Description

Minimum number of  arguments for this method is three. The first argument is the entity name and the other two are Field Alias – Field Values pair that will filter the result.

Structure of the method:

findMany('Entity Name', 'Field Alias', 'Field Value', 'Order by Field Alias', 'Order direction', 'Limit')

Parameters

The first argument is always Entity Name like for example “lead” or “contact”.

First pair:

Field Alias — Field alias to search for like first_name, email etc

Field Value— Field alias value

Second pair:

Order by Field Alias — Sort the data by a selected Field Alias

Order direction— The data order in ascending or descending 

Limit:

Limit— The limit number we want to fetch

Examples

{% set leads= findMany('lead','status', 'pending', 'date_modified','desc')%}

{% for lead in leads%}

  {{lead.first_name}} - {{lead.email}}

{% endfor %}
//Output: List of first_name - last_name of leads with status pending, ordered by date_modified, descending

To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy and subscribe to our YouTube channel Flexie CRM.

How can we help?