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
13 replies
Subscribers
9 subscribers
Views
5608 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
in record view, how to fix : Error Evaluation UI Expression Expr
cynthiaw
over 9 years ago
in record view, how to fix :
Error Evaluation UI Expression
Expression evaluation error in rule xxxxxxxxx at function 'index' parameter 3 [line 16]: Invalid index: Cannot index property 'data' of type Text into type xxxxxxxx (APNX-1-4198-000)
OriginalPostID-209021
OriginalPostID-209021
Discussion posts and replies are publicly visible
0
cynthiaw
over 9 years ago
index(local!datasubset.data, "UpdatedBy", null)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Elisa Chang
A Score Level 1
over 9 years ago
It looks like you're passing in a text rather than a query value to index. What are you indexing to try and get the "data" part? Can you post your code?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
cynthiaw
over 9 years ago
the local!datasubset is using rule!GEN_getAllDivAuditByDivNo(rf!divisionViewId) to return a CDT data type
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
cynthiaw
over 9 years ago
with(
local!datasubset: rule!GEN_getAllDivAuditByDivNo(rf!divisionViewId),
a!gridField(
totalCount: local!datasubset.totalCount,
columns: {
a!gridTextColumn(
label: "DivNo",
field: "DivNo",
data: index(local!datasubset.data, "DivNo", null)
),
a!gridTextColumn(
label: "UpdatedBy",
field: "UpdatedBy",
data: index(local!datasubset.data, "UpdatedBy", null)
),
a!gridTextColumn(
label: "UpdatedOn",
field: "UpdatedOn",
data: index(local!datasubset.data, "UpdatedOn", null)
),
a!gridTextColumn(
label: "Comments",
field: "Comments",
data: index(local!datasubset.data, "Comments", null)
)
},
value: local!pagingInfo,
saveInto: local!pagingInfo
)
UpdatedBy is one element or column from this dataset, what type should be used for this parameter 3?
Thanks,
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Elisa Chang
A Score Level 1
over 9 years ago
Can you paste here the value of local!datasubset?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 9 years ago
It's likely that rule!GEN_getAllDivAuditByDivNo() is either a query rule and so should have a pagingInfo value passed in our the rue itself is already returning the .data attribute
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
cynthiaw
over 9 years ago
I attached my code as file.
I am totally in Appian tool. my purpose is creating a interface to get the data for a specific record. first the query GEN_getAllDivAuditByDivNo() return all data for this record, the interface will show four columns, divNo is interger, UpdatedBy is text, UpdatedOn is datetime, Comments is Text.
Thanks!
please tell me how to deal with it or give me a example.
code.docx
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 9 years ago
I suggest the following, if it doesn't work please share the code for rule!GEN_getAllDivAuditByDivNo():
local!datasubset: rule!GEN_getAllDivAuditByDivNo(rf!divisionViewId, local!pagingInfo)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
cynthiaw
over 9 years ago
Great!! Thanks to Tim!!!! It works!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 9 years ago
But most importantly do you understand why??
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>