Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
11 subscribers
Views
2684 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
Hi All, Is there any way to limit the number of record in the list vi
sunnya527
A Score Level 2
over 8 years ago
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
0
sikhivahans
over 8 years ago
@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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
sikhivahans
over 8 years ago
@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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data