I created a query rule in which I am going up against a database and checking to

I created a query rule in which I am going up against a database and checking to see if a value is null. The column in question is called COP_NUM. In the attached screenshot, the column is populated with "NULL". When I use the following SQL statement outside of Appian, I get back the correct rows:
select * from ppe_reports.dbo.cop_automation
where cop_Num IS NULL

My query rule uses the condition COP_NUM=COP_NUMValue. I do not know what value to pass to COP_NumValue in a query expression to make the query work. I tried entering nothing, then "", and then '' but with no sucess. Can anyone help? Thank you. ...

OriginalPostID-109907

OriginalPostID-109907

  Discussion posts and replies are publicly visible

Parents
  • Unless you are using the "includes" operator, you can't pass a null value into a query rule. Here are a few alternatives:

    1. Use a query database node: ex. select <fieldA> from <table> where <fieldB> is not NULL
    2. Create a view that filters the rows based on these null values. Then query that table.
    3. Use a query rule to call back a bigger datasubset, then filter nulls in process.

    There are positives and downsides to each scenario, so think about each one before implementing.
Reply
  • Unless you are using the "includes" operator, you can't pass a null value into a query rule. Here are a few alternatives:

    1. Use a query database node: ex. select <fieldA> from <table> where <fieldB> is not NULL
    2. Create a view that filters the rows based on these null values. Then query that table.
    3. Use a query rule to call back a bigger datasubset, then filter nulls in process.

    There are positives and downsides to each scenario, so think about each one before implementing.
Children
No Data