QueryOptions
Controls paging, filtering, and sorting for Group.QueryAsync. Set the options needed by the request explicitly and use the SDK distributed with your AI Command Center installation.
Constructor
QueryOptions() creates a query options object.
Properties
| Property | Usage | Example |
|---|---|---|
Skip | Number of records to omit before returning a page. Start at zero. | 0 |
Take | Requested page size. Use a positive, bounded value. Use GetAllGroupsAsync when you need the complete group list. | 50 |
Filter | Filter expression represented by nested System.Collections.ArrayList values. | A comparison on Name. |
Sort | Sort descriptors specifying the field and direction. | new[] { new SortingInfo { Selector = "Name", Desc = false } } |
RequireTotalCount | Requests calculation of the total matching record count. Group.QueryAsync returns a collection and does not expose a separate count property. | Omit when the count is not consumed. |
CaseInsensitiveSearch | Controls case handling for string filters. Confirm behavior in your deployed server build. | Set explicitly when case handling matters. |
Filter and sort expressions
A comparison contains a field name, an operator, and a value. Compound expressions join comparisons with a logical operator; nest expressions to make grouping explicit.
using System.Collections;
using IntelliBuddies.Client.Models.Requests;
using IntelliBuddies.Client.Models.Responses;
var queryOptions = new QueryOptions
{
Skip = 0,
Take = 50,
Filter = new ArrayList
{
new ArrayList { "Name", "contains", "Finance" },
"and",
new ArrayList { "IsEnabled", "=", true }
},
Sort = new[]
{
new SortingInfo { Selector = "Name", Desc = false }
}
};
This example illustrates the filter shape. Verify supported fields, operators, declared property types, defaults, page limits, and invalid-filter behavior against the SDK and server used by your application. Confirm case-sensitive search and invalid-filter handling in the deployed build before relying on them.
Use a consistent sort when paging. Advance Skip by the number of records returned and stop on an empty page. See SDK usage for pagination and failure handling.
SortingInfo
Defines a sort field and direction for the group query.
| Property | Description |
|---|---|
Selector | Field to sort by, such as Name. |
Desc | true requests descending order; false requests ascending order. |
Related models
Task service fetch APIs use TaskQueryOptions. Use the options and sorting types documented for the API you are calling; do not assume the group and task query models are interchangeable.