How to GlideRecord a Table along with giving Pagination details and Orderby values as Queryparams.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 03:22 AM
I need to Query a Table Using Gliderecord functionality, along with giving pagination details.
while querying, I need it to be sorted by a choice field's Label (the choice field which resides within the table).
I have tried orderBy(), sortBy(), chooseWindow(), setLimit(), setOffset(), setStart().
Is there any other way to do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 06:24 AM
You might be able to do this with the Table API. Check out Rest Explorer and see if you can do it there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 08:48 PM
What went wrong with "chooseWindow()"? That seems to be the right fit ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 02:14 AM
"chooseWindow()" is working fine, It is fetching the records as per the offset & Limit.
But I need to Sort the records(using a choice field's label) first, then query the same using chooseWindow().
It is not working as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 04:21 PM
Can you share the snip of code?
Are you trying to use all of those? You should just be able to use chooseWindow() without setLimit(), setOffset(), or setStart() ... I know this might be a dumb question, but I can't tell from your answer, so it's better to ask. 😎
Is the choice field also a table? Are the choices represented in their own table? If so, you might create a database view, join the tables, then sort the result. That might have more predictable behavior. (If not, you can probably create a small table to try this out.)