GlideRecord Limit by Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 02:14 AM - edited 05-30-2024 02:24 AM
Use Case:
| Category | Name | Impact |
| Category A | TestName1 | High |
| Category A | TestName2 | Medium |
| Category B | TestName3 | Low |
| Category B | TestName4 | Low |
| Category B | TestName5 | Medium |
| Category C | TestName6 | Medium |
| Category C | TestName7 | Low |
| Category D | TestName8 | High |
| Category D | TestName9 | High |
I want to get all records and limit to only 3 Categories order by Impact.
This would be the display after the query:
| Category A | TestName1 | High |
| Category A | TestName2 | Medium |
| Category B | TestName3 | Low |
| Category B | TestName4 | Low |
| Category B | TestName5 | Medium |
| Category D | TestName8 | High |
| Category D | TestName9 | High |
How to query this?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 02:18 AM
Please elaborate: what is your use case? You are providing a table with data. That's not a use case. What are you trying to achieve? What is the requirement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 02:46 AM
Assuming the 1st table is the data.
I want to query the records of at least 3 categories order by Impact.
From the data we have 4 Categories (Category A, Category B, Category C, Category D),
But I want to query the records and limit to 3 Categories only.
My question is how to query that one using GlideRecord?
Hope this helps you understand the Use Case.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 05:46 AM
No it doesn't. Just select 3 categories. How are you limiting them? What do you want to see? This really doesn't make sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 12:13 AM
How do you select just 3 categories?