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
+1
person also asked this
people also asked this
Replies
15 replies
Answers
2 answers
Subscribers
8 subscribers
Views
21701 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Expression evaluation error at function 'contains' [line 39]: Invalid types, can only act on data of the same type (Any Type, Text)
eliav
over 7 years ago
Hello All,
I need to read an array extracted by a datasubset just to know if it contains a particular string
Following the code
contains(
index(
local!datasubset.data,
"status",
null
)
,"TO DO")
I have this eror
Expression evaluation error at function 'contains' [line 39]: Invalid types, can only act on data of the same type (Any Type, Text)
How can I do ?
Thanks
Elia
OriginalPostID-253930
Discussion posts and replies are publicly visible
Top Replies
Stefan Helzle
over 7 years ago
+2
suggested
A Score Level 3
You can use the function touniformstring() to convert a list of any data to a list of strings. tostring() concatenates all items to a single string.
PhilB
over 7 years ago
+1
A Score Level 1
Try wrapping the index() function in tostring().
Mike Schmitt
over 7 years ago
+1
suggested
Certified Lead Developer
Be careful - contains() expects its first parameter to be an array, and in this case it's an array of the property "status" from your datasubset. Wrapping this in "tostring()" will cause the whole array…
Parents
0
Mike Schmitt
Certified Lead Developer
over 7 years ago
A valid code snippet should be something like:
contains(
touniformstring(
property(
local!datasubset.data,
"status",
{} /*null*/
)
),
"TO DO"
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Mike Schmitt
Certified Lead Developer
over 7 years ago
A valid code snippet should be something like:
contains(
touniformstring(
property(
local!datasubset.data,
"status",
{} /*null*/
)
),
"TO DO"
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data