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
7893 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
0
aswinb
over 11 years ago
This section Layout rule is being wrapped inside a main rule where there is formLayout. I call this rule inside that formLayout.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jesse.triplett
Appian Employee
over 11 years ago
If you comment out this section, does the form open? I recommend commenting out parts of the code until you can ascertain which component is causing the javascript error.
Additionally, you'll want to replace the {} with null in the index() calls for the dropdown items. In the case it reaches that last {}, a null will return the placeholderLabel but the {} will not work in the dropdown.
index(index(ri!companyContact4, "CompanyContactDetails", {}), "CompanyContactDetailId", null),
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aswinb
over 11 years ago
then I will have to delete everything....all that's inside this rule are textboxes and dropdowns and all of them have this issue.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jesse.triplett
Appian Employee
over 11 years ago
You can use the comment functionality in SAIL by placing a section of code between /*.....*/. No need to delete anything
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aswinb
over 11 years ago
I tried commenting out...it shows that all textboxes and dropdowns except the paragraph field at the end don't work.....and all of those fields are where I pass in ri!companyContact#.CompanyContactDetails.(Value or CompanyContactDetailId)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jesse.triplett
Appian Employee
over 11 years ago
Okay, so if you just uncomment one of the text fields and leave the rest of the dropdowns comments out, does the javascript error occur? Try placing ri!companyContact4 or whichever CDT is relevant into that text field and verifying that the CDT structure shows in the field.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aswinb
over 11 years ago
No the curious thing is I have another rule section that has the same error but it renders perfectly on the tempo. It also has the exact same code except that this one has 4 CDT's but the other one has only 1. I will have to work on it Jesse but thanks for your immense help today!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<