Is there a way to set up a query entity to filter on fields that are an empty st

Certified Senior Developer
Is there a way to set up a query entity to filter on fields that are an empty string?

The following returns an error:

a!queryFilter(
field: "FIELDNAME",
operator: "<>",
value: ""
),

However, operator: "is null" seems to exclude the results that are "".

This is especially an issue because Appian will write an "" to a varchar field when a null is passed into a Write to Datastore entity. Now there is no way to query for these rows.

OriginalPostID-142029

OriginalPostID-142029

  Discussion posts and replies are publicly visible

Parents
  • I meant that this would be a two step process -

    1. Store data from query into a local variable
    2. Filter the datasubset

    Here's an example -

    load (
    local!queryData: rule!getAllEmployees(),
    a!formLayout(
    label: "Null filter test",
    firstColumnContents: {
    a!textField(
    label: "All data",
    value: local!queryData,
    readOnly: true()
    ),
    a!textField(
    label: "Filtered data",
    value: index(local!queryData, where(len(local!queryData.name)>1), {}),
    readOnly: true()
    ),
    }
    )
    )
Reply
  • I meant that this would be a two step process -

    1. Store data from query into a local variable
    2. Filter the datasubset

    Here's an example -

    load (
    local!queryData: rule!getAllEmployees(),
    a!formLayout(
    label: "Null filter test",
    firstColumnContents: {
    a!textField(
    label: "All data",
    value: local!queryData,
    readOnly: true()
    ),
    a!textField(
    label: "Filtered data",
    value: index(local!queryData, where(len(local!queryData.name)>1), {}),
    readOnly: true()
    ),
    }
    )
    )
Children
No Data