Is there a way I can filter the data that I bring in as a part of each grid expression?

Greetings. I have a question on how to. I have examined the Grid Tutorial, and have constructed a report with a grid that pulls records from my database. I have a record type constant that retrieves my data, and an expression rule that brings the particular data into the grid. This all works well. The problem that I have is that I want to bring back about 40 different grids depending on business units and data that I'm returning. Is there a way I can filter the data that I bring in as a part of each grid expression, or do I have to set up a record type to filter for each of these different data values, then a rule and a constant? There are two different data series for 3 business lines, so it could go up to 108 different record/rule/constant combinations....

OriginalPostID-75936

OriginalPostID-75936

  Discussion posts and replies are publicly visible

Parents
  • Here's some documentation I created for creating a Grid using Queryrecord(). It leverages many of the rules in the Appian Common Objects Library:

    How to quickly generate a SAIL Paging Grid using queryrecord()

    *Create the "data" rule

    The first step is to create an expression rule that defines the Data that will feed the paging grid:
    1. If you don't have it already, create a constant with your Record Type.
    2. Create a new expression Rule using the queryrecord() expression and the APN_querySelection() rule. It should take a single pagingInfo parameter of Any Type
    3. In the APN_querySelection() rule, for the fields parameter, include a Text Array of all the fields you want in your grid. The field names must match exactly to the ones defined in the Record.

    Example:
    Rule Name: CRT_customerBasicData:
    Description: Retrieves basic data for customers (doesn't include contact or location info)
    Parameters: pagingInfo - Any Type
    Definition:
    =queryrecord(
    recordType:cons!CRT_RECORD_TYPE_CUSTOMER,
    query: rule!APN_querySelection(
    fields: {"legalName","region","industry","sinceDt","licenseRevenue","servicesRevenue","status"},
    pagingInfo: ri!pagingInfo
    )
    )
Reply
  • Here's some documentation I created for creating a Grid using Queryrecord(). It leverages many of the rules in the Appian Common Objects Library:

    How to quickly generate a SAIL Paging Grid using queryrecord()

    *Create the "data" rule

    The first step is to create an expression rule that defines the Data that will feed the paging grid:
    1. If you don't have it already, create a constant with your Record Type.
    2. Create a new expression Rule using the queryrecord() expression and the APN_querySelection() rule. It should take a single pagingInfo parameter of Any Type
    3. In the APN_querySelection() rule, for the fields parameter, include a Text Array of all the fields you want in your grid. The field names must match exactly to the ones defined in the Record.

    Example:
    Rule Name: CRT_customerBasicData:
    Description: Retrieves basic data for customers (doesn't include contact or location info)
    Parameters: pagingInfo - Any Type
    Definition:
    =queryrecord(
    recordType:cons!CRT_RECORD_TYPE_CUSTOMER,
    query: rule!APN_querySelection(
    fields: {"legalName","region","industry","sinceDt","licenseRevenue","servicesRevenue","status"},
    pagingInfo: ri!pagingInfo
    )
    )
Children
No Data