Hi, fairly new to appian and I'm trying to use type! to get the type value of a string array. I'm currently using typeof({"A", "B"}) which is working, but seems very clunky. I'm sure there's a better way. Any help? Thanks!
Discussion posts and replies are publicly visible
I wouldn't have any issues using that code in production, but if you want another way to do it, try:
fn!cast(103,null)
a!listType(type!Text)
where is the 103 from and what's its significance?
docs.appian.com/.../constant-values.html
ah, this is awesome. thank you!
But keep in mind, that you can reference all Appian types using "type!". I do not use any type numbers directly.
type!Variant
type!Text
type!Map
etc...
right, I guess that was really my question--what do I put after type! to get 103 back? or is that what you were saying in your other answer?
yes
Singular type: type!Text
Plural type: type!Text?list or a!listType(type!Text)
BTW, toInteger() etc. work with lists directly. For turning a list of Integers into a list of strings, use touniformstring().
perfect. thank you so much for your help!
You are welcome :-)