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
7 replies
Subscribers
7 subscribers
Views
5371 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
If a query entity returns an empty set (due to the filters), will that empty set
Jason Ruvinsky
Certified Senior Developer
over 9 years ago
If a query entity returns an empty set (due to the filters), will that empty set be automatically cast to the type of the Data Entity, or do we need to perform this cast in our rules to ensure the query entity is null-safe (it always returns the expected type, whether it is an empty array or not. Otherwise using dot-notation to access fields of a CDT will result in errors, although the property() function would also let us be null-safe)....
OriginalPostID-131791
OriginalPostID-131791
Discussion posts and replies are publicly visible
Parents
0
Jason Ruvinsky
Certified Senior Developer
over 9 years ago
Note that my above suggestion ends up giving you an array of a single element of your CDT type (which has all fields null). This is not equal to a null or an empty list, so certain things won't work properly when you do this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Jason Ruvinsky
Certified Senior Developer
over 9 years ago
Note that my above suggestion ends up giving you an array of a single element of your CDT type (which has all fields null). This is not equal to a null or an empty list, so certain things won't work properly when you do this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data