Skip to main content
Known Participant
Jun 9, 2025 2:40 PM UTC
Question

Query Entity - Filter Searching not working

Hi All

When i am doing filtering not getting expected output.

Below code is mentioned
a!queryEntity(
entity: cons!LOCALE_TRANSLATION_NEW,
query: a!query(
selection: if(
rule!P3_utils_checkIsNullOrEmpty(ri!columns),
{},
a!querySelection(
columns: a!forEach(
items: ri!columns,
expression: a!queryColumn(field: fv!item, alias: fv!item)
)
)
),
logicalExpression: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(
field: "label_txt",
operator: "=",
value: ri!label_txt,

),

},
ignoreFiltersWithEmptyValues: true
),
pagingInfo: if(
rule!P3_utils_checkIsNullOrEmpty(ri!pagingInfo),
a!pagingInfo(
startIndex: 1,
batchSize: cons!P3_BATCH_SIZE[7]
),
ri!pagingInfo
)
),
fetchTotalCount: and(ri!isFetchTotalCount)
)


=======================================
When i searched "Research". It is giving me expected output


Is it default behavior of Appian ?




Expected result - It should not return anything because there is no label like "Research  " in DB tables


    2 replies

    mikes0011
    Brainy
    Jun 9, 2025 3:34 PM UTC

    The Expression Guru
    mikes0011
    Brainy
    Jun 9, 2025 3:38 PM UTC

    I've tested this and can reproduce this behavior in 25.2.  It's possible that QueryEntity simply trims traling spaces.  If you're not sure if this behavior is intended, and/or it's causing you issues you are having trouble getting around, then I would encourage you to open a support case with Appian.

    The Expression Guru