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
17 replies
Subscribers
7 subscribers
Views
7888 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi All, I have a CDT rule input of type "Any Type" called r
aswinb
over 11 years ago
Hi All,
I have a CDT rule input of type "Any Type" called ri!companyContact. I am trying to pass this rule input to a textField's value field. There is a nested CDT inside this CDT. I am actually trying to store the value into one of those fields inside the inner CDT. But it is giving an error saying "Cannot index property "CompanyContactDetails" of type Text into type Text" where inner CDT is called "CompanyContactDetails".
This is the code:
a!textField(
label:"",
value: ri!companyContact.CompanyContactDetails.DetailTypeId,
saveInto: ri!companyContact.CompanyContactDetails.DetailTypeId
)
Can anybody help on this issue?...
OriginalPostID-107781
OriginalPostID-107781
Discussion posts and replies are publicly visible
Parents
0
jesse.triplett
Appian Employee
over 11 years ago
If you didn't pass in the CDT it will not work. It cannot find that field because it doesn't exist. You could use the index() instead of dot notation when reading out of the CDT for a more robust expression.
a!textField(
label:"",
value: index(index(ri!companyContact,"CompanyContactDetails",{}),"DetailTypeId",{}),
saveInto: ri!companyContact.CompanyContactDetails.DetailTypeId
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
jesse.triplett
Appian Employee
over 11 years ago
If you didn't pass in the CDT it will not work. It cannot find that field because it doesn't exist. You could use the index() instead of dot notation when reading out of the CDT for a more robust expression.
a!textField(
label:"",
value: index(index(ri!companyContact,"CompanyContactDetails",{}),"DetailTypeId",{}),
saveInto: ri!companyContact.CompanyContactDetails.DetailTypeId
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data