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
1179 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 9 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
Parents
0
elizabeth.epstein
over 9 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
Reply
0
elizabeth.epstein
over 9 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
Children
No Data