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
  • Create The Grid Definition Rule

    Once we know where the data is coming from, since the queryrecord() already returns a dataset, all we need is to call the APN_uiPagingGridAutoColumns:

    1. Create an expression rule using load() to reuse the paging definition and the APN_uiPagingGridAutoColumns rule
    2. Label for the Grid if you want
    3. For dataSubset, use the rule created in the previous step
    4. Under Column Labels, enter an array of Column Names. They should correspong to the fields in the data rule
    5. Under Column Fields, enter the same fields as in the data expression
    6. Define the paging info to a value that makes sense, such as 5 or 10

    Example:
    Rule Name: CRT_customerBasicPagingGrid
    Description: Definition of a SAIL Paging grid for Basic Customer Data
    Parameters: None
    Definition:
    =load(
    local!basicPagingInfo: rule!APN_pagingInfo(batchSize: 5),
    rule!APN_uiPagingGridAutoColumns(
    label: "Current Customers",
    dataSubset: rule!CRT_customerBasicData(local!basicPagingInfo),
    pagingInfo: local!basicPagingInfo,
    columnLabels: {"Legal Name", "Region", "Industry", "Since Dt", "License Revenue","Services Revenue", "Status"},
    columnFields: {"legalName","region","industry","sinceDt","licenseRevenue","servicesRevenue","status"}
    )
    )
Reply
  • Create The Grid Definition Rule

    Once we know where the data is coming from, since the queryrecord() already returns a dataset, all we need is to call the APN_uiPagingGridAutoColumns:

    1. Create an expression rule using load() to reuse the paging definition and the APN_uiPagingGridAutoColumns rule
    2. Label for the Grid if you want
    3. For dataSubset, use the rule created in the previous step
    4. Under Column Labels, enter an array of Column Names. They should correspong to the fields in the data rule
    5. Under Column Fields, enter the same fields as in the data expression
    6. Define the paging info to a value that makes sense, such as 5 or 10

    Example:
    Rule Name: CRT_customerBasicPagingGrid
    Description: Definition of a SAIL Paging grid for Basic Customer Data
    Parameters: None
    Definition:
    =load(
    local!basicPagingInfo: rule!APN_pagingInfo(batchSize: 5),
    rule!APN_uiPagingGridAutoColumns(
    label: "Current Customers",
    dataSubset: rule!CRT_customerBasicData(local!basicPagingInfo),
    pagingInfo: local!basicPagingInfo,
    columnLabels: {"Legal Name", "Region", "Industry", "Since Dt", "License Revenue","Services Revenue", "Status"},
    columnFields: {"legalName","region","industry","sinceDt","licenseRevenue","servicesRevenue","status"}
    )
    )
Children
No Data