Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
+2
person also asked this
people also asked this
Replies
9 replies
Answers
5 answers
Subscribers
9 subscribers
Views
10966 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Is there a way to set up a query entity to filter on fields that are an empty st
Jason Ruvinsky
Certified Senior Developer
over 9 years ago
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
Top Replies
jarrods229
over 9 years ago
+5
suggested
The following seems to work in the query filter from what I can tell operator: "not in", value:{""}
Parents
0
rupeshc
over 9 years ago
Hi jason!
If you run a null check by using isnull("") , it will run correctly. However for more functionality, you have to make a utility rule for cases where isnull might fail. You can make a rule named "CheckIsNull" with the following syntax:
if(ri!List ="",true(),if(isnull(ri!List),true(),if(length(ri!List) > 0,false(),true())))
where "List" is of Any type.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
rupeshc
over 9 years ago
Hi jason!
If you run a null check by using isnull("") , it will run correctly. However for more functionality, you have to make a utility rule for cases where isnull might fail. You can make a rule named "CheckIsNull" with the following syntax:
if(ri!List ="",true(),if(isnull(ri!List),true(),if(length(ri!List) > 0,false(),true())))
where "List" is of Any type.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data