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
  • I'm sure that there is a filter that I can apply to the queryrecord, but I don't know how to format it into my expression.
    Which is something like:

    with(
    local!datasubset: rule!ER_SR_HOME_DATA_KTLO(
    'type!PagingInfo'(
    startIndex: 1,
    batchSize: -1,
    sort: {field: "launch", ascending: true}
    )
    ),
    'type!Grid'(
    label: "Business as Usual",
    totalCount: local!datasubset.totalCount,
    columns: {
    'type!GridTextColumn'(
    label: "Product",
    data: local!datasubset.data.site,
    alignment: "LEFT"
    ),
    'type!GridTextColumn'(
    label: "Title",
    data: local!datasubset.data.summary,
    alignment: "LEFT"
    ),
    'type!GridTextColumn'(
    label: "Phase",
    data: local!datasubset.data.phase,
    alignment: "LEFT"
    ),
    'type!GridTextColumn'(
    label: "Launch Date",
    data: local!datasubset.data.launch,
    alignment: "LEFT"
                        )
    },
    value: 'type!PagingInfo'(
    startIndex: local!datasubset.startIndex,
    batchSize: local!datasubset.batchSize
    )

    I would like to run that query and filter on launchDate to select all data in the past 30 days.
    In here somewhere:
    =queryrecord(
    recordType: cons!SR_ER_HOME_LAST30,
    query: 'type!Query'(
    'selection|aggregation': 'type!Aggregation'(
    columns: {
    'type!AggregationColumn'(
    field: "launchDate",
    alias: "launch",
    visible: true,
    isGrouping: true
    ),
    'type!AggregationColumn'(
    field: "site",
    alias: "site",
    visible: true,
    isGrouping: true
    ), 'type!AggregationColumn'(
    field: "summary",
    alias: "summary",
    visible: true,
    isGrouping: true
    ), 'type!AggregationColumn'(
    field: "theme",
    alias: "theme",
    visible: true,
    isGrouping: true
    )
    }
    ),
    pagingInfo: 'type!PagingInfo'(startIndex: 1, batchSize: -1, sort: {field:
    "launch", ascending: true})
    )
    )
Reply
  • I'm sure that there is a filter that I can apply to the queryrecord, but I don't know how to format it into my expression.
    Which is something like:

    with(
    local!datasubset: rule!ER_SR_HOME_DATA_KTLO(
    'type!PagingInfo'(
    startIndex: 1,
    batchSize: -1,
    sort: {field: "launch", ascending: true}
    )
    ),
    'type!Grid'(
    label: "Business as Usual",
    totalCount: local!datasubset.totalCount,
    columns: {
    'type!GridTextColumn'(
    label: "Product",
    data: local!datasubset.data.site,
    alignment: "LEFT"
    ),
    'type!GridTextColumn'(
    label: "Title",
    data: local!datasubset.data.summary,
    alignment: "LEFT"
    ),
    'type!GridTextColumn'(
    label: "Phase",
    data: local!datasubset.data.phase,
    alignment: "LEFT"
    ),
    'type!GridTextColumn'(
    label: "Launch Date",
    data: local!datasubset.data.launch,
    alignment: "LEFT"
                        )
    },
    value: 'type!PagingInfo'(
    startIndex: local!datasubset.startIndex,
    batchSize: local!datasubset.batchSize
    )

    I would like to run that query and filter on launchDate to select all data in the past 30 days.
    In here somewhere:
    =queryrecord(
    recordType: cons!SR_ER_HOME_LAST30,
    query: 'type!Query'(
    'selection|aggregation': 'type!Aggregation'(
    columns: {
    'type!AggregationColumn'(
    field: "launchDate",
    alias: "launch",
    visible: true,
    isGrouping: true
    ),
    'type!AggregationColumn'(
    field: "site",
    alias: "site",
    visible: true,
    isGrouping: true
    ), 'type!AggregationColumn'(
    field: "summary",
    alias: "summary",
    visible: true,
    isGrouping: true
    ), 'type!AggregationColumn'(
    field: "theme",
    alias: "theme",
    visible: true,
    isGrouping: true
    )
    }
    ),
    pagingInfo: 'type!PagingInfo'(startIndex: 1, batchSize: -1, sort: {field:
    "launch", ascending: true})
    )
    )
Children
No Data