Utilising Summary Types in Saved Searches

Summary Types can be used as criteria within a saved search (which determines which results are displayed) or as result columns (which define the data points that are displayed when the criteria is met).  There are six different Summary Types available when entering a summary criteria or result value:

  • GROUP : Rolls up search results under the column to which you apply this type.

Eg : In a search for sales transactions, you can group the transactions found by customer name.

The following code sample shows the syntax for this member. It is not a functional example.

//Add additional code

var mySearchFilter1 = search.createFilter({
name: ‘entity’,
summary: search.Summary.GROUP
});

//Add additional code
  • COUNT: Counts the number of results found that apply to this column.

Eg: In a search of customer deposits for a sales order, you can view the count of the number of customer deposits for a particular sales order.

The following code sample shows the syntax for this member. It is not a functional example.

//Add additional code

var mySearchFilter2= search.createFilter({
name: ‘internalid’,
summary: search.Summary.COUNT
});

//Add additional code
  • SUM : Sums search results.

Eg : In a search of purchases this period, you can total the Amount column on your results.

The following code sample shows the syntax for this member. It is not a functional example.

//Add additional code

var mySearchFilter3= search.createFilter({
name: ‘amount’,
summary: search.Summary.SUM
});

//Add additional code
  • MINIMUM : Shows the minimum amount found in search results.

Eg: In a search of sales transactions by sales rep, you can show the minimum amount sold in the transaction.

The following code sample shows the syntax for this member. It is not a functional example.

//Add additional code

var mySearchFilter4= search.createFilter({
name: ‘amount’,
summary: search.Summary.MIN
});

//Add additional code
  • MAXIMUM : Shows the maximum amount found in search results.

Eg : In a customer search by partner, you can show the maximum amount of sales by each partner.

The following code sample shows the syntax for this member. It is not a functional example.

//Add additional code

var mySearchFilter5= search.createFilter({
name: ‘amount’,
summary: search.Summary.MAX
});

//Add additional code
  • AVERAGE : Calculates the average amount found in your search results.

Eg : the average sales order amount by a customer.

The following code sample shows the syntax for this member. It is not a functional example.

//Add additional code

var mySearchFilter6= search.createFilter({
name: ‘amount’,
summary: search.Summary.AVG
});

//Add additional code

Leave a comment

Your email address will not be published. Required fields are marked *