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
3297 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
Tom Ryan
Appian Employee
over 9 years ago
To clarify regarding the behavior of touniformstring(), here it seems to stem from a combination of the way Appian handles arrays and the use of apply(). Appian flattens nested arrays in slightly different ways depending on the base data type, and the output of apply() is flattened as well. Your example is complicated by apply() returning Any Type; if you create an array of strings similarly to the way Amit described above, touniformstring() preserves the blank element. Hope that helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Tom Ryan
Appian Employee
over 9 years ago
To clarify regarding the behavior of touniformstring(), here it seems to stem from a combination of the way Appian handles arrays and the use of apply(). Appian flattens nested arrays in slightly different ways depending on the base data type, and the output of apply() is flattened as well. Your example is complicated by apply() returning Any Type; if you create an array of strings similarly to the way Amit described above, touniformstring() preserves the blank element. Hope that helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data