Does anyone have a good method to find a blank value in an local array? I like

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
  • 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.
Reply
  • 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.
Children
No Data