Hi All, Is there any way to limit the number of record in the list vi

Hi All,

Is there any way to limit the number of record in the list view of an entity backed records. For eg: I created a entity backed employee record I want to show only latest five records to the user in the list view. Is there any way to configure it

OriginalPostID-169273

OriginalPostID-169273

  Discussion posts and replies are publicly visible

Parents
  • @patrickh Let's say we do have a rule by name 'getLatestMyEntityRecordIdsToIncludeInListView' and its definition will be as follows:
    a!queryEntity(
    entity: cons!MY_ENTITY,
    query: a!query(
    selection: a!querySelection(
    columns: {
    a!queryColumn(
    field: "id"
    )
    }
    ),
    filter: null,
    pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 5,
    \t sort: a!sortInfo(
    field: "lastUpdated",
    ascending: false
    )
    )
    )
    ).data.id

    The objective of the above rule is to fetch only those ids of the records that were last updated and that too only those many records (5 in this example) that were specified in batch size.

    In the default filters of the Record, you could include a condition as follows:

    id IN rule!getLatestMyEntityRecordIdsToIncludeInListView()

    That is just an idea, but we could later extend the getLatestMyEntityRecordIdsToIncludeInListView rule and make it work on any other column(s), any other condition(s) and thereby give the filtered or desired records.
Reply
  • @patrickh Let's say we do have a rule by name 'getLatestMyEntityRecordIdsToIncludeInListView' and its definition will be as follows:
    a!queryEntity(
    entity: cons!MY_ENTITY,
    query: a!query(
    selection: a!querySelection(
    columns: {
    a!queryColumn(
    field: "id"
    )
    }
    ),
    filter: null,
    pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 5,
    \t sort: a!sortInfo(
    field: "lastUpdated",
    ascending: false
    )
    )
    )
    ).data.id

    The objective of the above rule is to fetch only those ids of the records that were last updated and that too only those many records (5 in this example) that were specified in batch size.

    In the default filters of the Record, you could include a condition as follows:

    id IN rule!getLatestMyEntityRecordIdsToIncludeInListView()

    That is just an idea, but we could later extend the getLatestMyEntityRecordIdsToIncludeInListView rule and make it work on any other column(s), any other condition(s) and thereby give the filtered or desired records.
Children
No Data