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
3 replies
Subscribers
8 subscribers
Views
3298 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Does anyone have a good method to find a blank value in an local array? I like
danielh754
over 9 years ago
Does anyone have a good method to find a blank value in an local array? I like to write complex SAIL rules using lots of local variables and arrays. My biggest headache is that touniformstring() doesn't appear to behave as described in documentation.
Documentation says "Converts a value to Text, preserving the original scalar or array structure." Yet as you can see in the image it REMOVES blanks from an array. Has anyone else noticed this? I'm writing a lot of complex rules that heavily use local variables and array with indexes. Therefore I use wherecontains() frequently. wherecontains() requires that both parameters be of the same type so I often convert one or both parameters to text (or relevant type).
Note: I'm in Appian 7.5
OriginalPostID-149282
OriginalPostID-149282
Discussion posts and replies are publicly visible
Parents
0
Amitkumar
over 9 years ago
Try this one to find blank value in an array
fn!wherecontains(tostring(""),apply(fn!tostring,{2,"",1,""})) --> 2;4
Length function does not consider null values while calculating length of the input. You can use count function to get exact number of elements including null values.
count(apply(fn!tostring,{2,"",1})) --> 3
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Amitkumar
over 9 years ago
Try this one to find blank value in an array
fn!wherecontains(tostring(""),apply(fn!tostring,{2,"",1,""})) --> 2;4
Length function does not consider null values while calculating length of the input. You can use count function to get exact number of elements including null values.
count(apply(fn!tostring,{2,"",1})) --> 3
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data