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
5 replies
Subscribers
7 subscribers
Views
1577 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I have a SAIL user input form that gathers user-entered data and keep getting th
judym598
Certified Senior Developer
over 8 years ago
I have a SAIL user input form that gathers user-entered data and keep getting the following error:
ERROR:An error occurred while evaluating expression: newProduct_cdt.notes:ac!newProduct_cdt.notes (Invalid index: Cannot index property 'notes' of type Text into null value of type IPS_Product?list) (Data Outputs)
I have 'newProduct_cdt and whereTo_txt' as a data inputs and in my form:
abc_getProductData(
newProduct_cdt: ac!newProduct_cdt,
whereTo_txt: ac!whereTo_txt)
Data outputs are:
ac!newProduct_cdt is stored as newProduct_cdt
ac!whereTo_txt is stored as whereTo_txt
The fields are all basic user input fields (see example below)
a!paragraphField(
label: "Notes",
labelPosition: "ABOVE",
value: ri!newProduct_cdt.notes,
saveInto: ri!newProduct_cdt.notes,
refreshAfter: "UNFOCUS",
required: false,
validations: {}
)
The I got errors for each part of the CDT. The...
OriginalPostID-166767
OriginalPostID-166767
Discussion posts and replies are publicly visible
0
judym598
Certified Senior Developer
over 8 years ago
... only way I resolved it is to create a separate pv for each part of the newProduct_cdt pv and then save them into the cdt (i.e., ac!notes_txt is stored as newProduct_cdt.notes
What's causing these invalid index errors?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ambrishs
Certified Senior Developer
over 8 years ago
Looking at error It appears that you have list of CDT and trying to save in a field.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rajivr
Certified Associate Developer
over 8 years ago
Even i came across this kind of error, but atlast found that there was no such error when i run the SAIL form in tempo. But you get that error only inside the SAIL interface. Run in tempo as an action and see, it will work fine.. Your code has no problem.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@judym Could you please elaborate on the type information (single or multiple) of the newProduct_cdt, newProduct_cdt.notes and types of interface inputs? I guess @ambrishs has nailed it and it would be worth taking a look at his suggestion.
@rajivr I guess the problem is not about the code here, but the way we are accessing the cdt and the attributes inside it when they are single or multiple as specified by @ambrishs. Further I believe that the error specified by @judym is an error that was generated because of running a process but it was not an error that was generated while accessing the interface from the designer environment.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
judym598
Certified Senior Developer
over 8 years ago
That was it @ambrishs695. Thank you! I had 'Multiple' checked in the Field Properties when I shouldn't have. Unchecking that did the trick.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel