CustomQueryParameters
Queryable, Introduced in version 26.6
GET https://localhost:8001/sv/001.1/api/v1/Common/CustomQueryParameters
A parameter defined on a CustomQueries.
Each parameter is referenced by Name in the SQL of the query, with the parameter prefix of the
database: : for SQL Anywhere and PostgreSQL, @ for SQL Server. When the query is run with
RunCustomQuery, a value can be bound to the parameter by name.
Parameters that are not given a value use DefaultValue.
Change log
How changes to this entity are recorded is not documented, so the GUID below should not be relied on to filter EntityTypeId. It identifies this entity type where one is handed to you, for example in a ParentClass field. See Entity GUIDs for how entity GUIDs are used.
4B26E62F-21A7-46A6-8BB6-3EAA9CD0C61F
Properties
| Name | Type | Summary | Introduced in |
|---|---|---|---|
| Id | Int64 | The business key identifier of the custom query parameter. |
|
| CustomQueryDefinitionId | Int64 | The business key identifier of the custom query the parameter belongs to.
|
|
| Name | String | The name of the parameter, e.g. FromDate, without the SQL parameter prefix : or @.Use this name as Name in CustomQueryParameterValue when running the query. |
|
| Description | String | A description of what the parameter is used for, at most 100 characters. May be empty. |
|
| Type | Int32 | The data type of the parameter. Values bound to the parameter, including DefaultValue,are converted to this type before the query is run.
|
|
| DefaultValue | String | The value used when the parameter is not given a value in RunCustomQuery. The value is stored as a string in the same invariant format as Value in CustomQueryParameterValue, e.g. 2026-01-01 for a Dateparameter or 1250.50 for a Decimal parameter. When empty, or when it cannot be converted toType, the parameter is bound as SQL NULL. |
Example
A query with the SQL
SELECT ... WHERE OrderDate >= :FromDate
has a parameter with the name FromDate, the type Date and, for example,
the default value 2026-01-01.
JSON
{
"Id": 0,
"CustomQueryDefinitionId": 0,
"Name": null,
"Description": null,
"Type": 0,
"DefaultValue": null
}