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
4 replies
Subscribers
7 subscribers
Views
2919 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
hi I am trying to filter few rows from a list of CDT using "f
Siby
over 10 years ago
hi
I am trying to filter few rows from a list of CDT using "filterlist()", but encountered the following error message, please assist.
Details: ERROR:An error occurred while evaluating expression: Shipment:filterlist(#"_a-0000d7d1-0432-8000-a2f0-010000010000_5287"(pv!Shipment.LineNo),pv!vipShipmentCDT) (Expression evaluation error at function 'filterlist' parameter 1: Invalid index: Cannot index property 'LineNo' of type Text into null value of type VIPShipment?list) (Data Outputs)
Thanks
Stephen...
OriginalPostID-99705
OriginalPostID-99705
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 10 years ago
This is basically telling you that pv!Shipment is null which results in an invalid expression of type null.LineNo
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Siby
over 10 years ago
Thanks Eduardo, It was a typo error. Now there is no error, but it not filtering list items ( CDT) with LineNo=1 as defined in the rule.
filterlist(rule!isHeaderRecord(pv!vipShipmentCDT.LineNo),pv!vipShipmentCDT)
Regardless of the Rule, it return all items.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Siby
over 10 years ago
working after changing the rule as Text, "isHeaderRecord"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
That makes sense, looking at the expected syntax the rule has to be the name as text rather than the rule itself. Here's the example that used to be described in the deprecated shared components section of this plug-in
filterList("even",{1,2,3,4,5}) = {2,4} ; where function even (ri!number) = mod(ri!number,2)=0
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel