Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
7 subscribers
Views
1187 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I need to create a query rule to use in a tempo report that displays all rows of
Chasity Davis
over 10 years ago
I need to create a query rule to use in a tempo report that displays all rows of a CDT where a date is blank. Unfortunately, I cannot figure out how to write this type of query rule. Any ideas / suggestions? Thanks!...
OriginalPostID-116279
OriginalPostID-116279
Discussion posts and replies are publicly visible
0
elizabeth.epstein
over 10 years ago
If I understand correcty, the general issue you're running into is that you can't query for date=null on a Query Rule. Here are a few options:
-Maintain a default "empty" date in the Database (e.g. 1-1-1900), and query against that. The downside here is if you have a valid use case for displaying this blank date elsewhere, and you'll need to write rules to translate it every time. If other systems are sharing this table, they will need to know the empty date flag as well. So this could end up being very simple or very complicated.
-If your data set is relatively small, you could return the whole set from the DB and use the filter() function to get the rows you want.
-If your CDT is represented by a record, you can use queryrecord() with a!queryfilter which should work with null values properly.
-If you are on Appian 7.6, you can use queryEntity() with a!queryfilter to filter on null values. Queryentity() will work against any data source and doesn't require a record.
forum.appian.com/.../System_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Chasity Davis
over 10 years ago
Lizzie, thank you for the quick response.
Option 1 will not work as I do need the field to be empty on some occasions.
Option 2 - Right now my data set is decently small, but it will continue to grow so I don't think this is viable.
Option 3 - I'm a little fuzzy on this one, but I will research as it seems to be the only option that may work. I do have a record that represents this CDT.
Option 4 - We are on 7.5
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Chasity Davis
over 10 years ago
Lizzie, thanks for your suggestions. I was able to get Option 3 to work successfully!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel