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
Replies
13 replies
Answers
3 answers
Subscribers
9 subscribers
Views
23719 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
What does the following error mean? "Cannot index property "ID" o
aswinb
over 10 years ago
What does the following error mean? "Cannot index property "ID" of type text into type text"? ID is stored in database as integer and its being transmitted through a CDT entity into a grid. But whenever I try to execute the grid I get this error message. Any suggestions on how to resolve this issue.
thanks,...
OriginalPostID-103743
OriginalPostID-103743
Discussion posts and replies are publicly visible
Top Replies
Eduardo Fuentes
over 10 years ago
+1
Appian Employee
This indicates you are doing something like pv!myVariable.ID but pv!myVariable is of type TEXT instead of being of type CDT.
Eduardo Fuentes
over 10 years ago
+1
Appian Employee
You need to review the whole logic surrounding the use of that expression, there should be something casting this pv to text or a typo in the name that is making it point to the wrong pv. The meaning of…
davidl692
over 6 years ago
in reply to
Sunil Zacharia
+1
Certified Lead Developer
You may also want to look into null safety. Appian usually likes to implicitly cast "" or {} as an empty text or empty list of text when the variable is Any Type, or sometimes even when it's given a particular…
Parents
0
aswinb
over 10 years ago
Nope I am using a pv!myVariable of type "Any Type" and I calling pv!myVariable.ID
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sunil Zacharia
Certified Lead Developer
over 6 years ago
in reply to
aswinb
Try casting your pv!myVariable to an actual cdt having an ID property rather than "AnyType". This should fix the issue.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Sunil Zacharia
Certified Lead Developer
over 6 years ago
in reply to
aswinb
Try casting your pv!myVariable to an actual cdt having an ID property rather than "AnyType". This should fix the issue.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
0
davidl692
Certified Lead Developer
over 6 years ago
in reply to
Sunil Zacharia
You may also want to look into null safety. Appian usually likes to implicitly cast "" or {} as an empty text or empty list of text when the variable is Any Type, or sometimes even when it's given a particular type. If you're querying a complex dataset and return zero results Appian can often transform your lack of results into the empty string.
Try outputting type(typeof(yourVariable)) in a throwaway text field to see what kind of thing Appian thinks it is.
Cancel
Vote Up
+1
Vote Down
Sign in to reply
Verify Answer
Cancel