Skip to main content

Get records filter strucutre

Gets the template structure for filtering records in ORM queries

Function GetRecordsFilterStrucutre(Val Clear = False) Export

ParameterCLI optionTypeRequiredDescription
Clear--emptyBooleanTrue > structure with empty valuse, False > field descriptions at values

Returns: Structure Of KeyAndValue - Record filter element


tip

The use of the raw feature is necessary for compound constructions like BEETWEEN. For example: with raw:false the filter type:BETWEEN value:10 AND 20 will be interpolated as BETWEEN ?1 ^^.

where `?1 = "10 AND 20,"' which would cause an error.

In such a case, you must use raw:true to set the condition directly in the query text


1C:Enterprise/OneScript code example
    Result = OPI_SQLite.GetRecordsFilterStrucutre();
    oint sqlite GetRecordsFilterStrucutre \
--empty false
Result
{
"field": "<filtering field name>",
"type": "<comparison type>",
"value": "<comparison value>",
"union": "<connection with the following condition: AND, OR, etc..>",
"raw": "<true - the value will be inserted by text as it is, false - through the parameter>"
}