Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
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)
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 :-)
2 followup notes on this:
1) the type name is case sensitive (type!intger won't work, whereas type!Integer will)
2) you can use the '?list' notation, but it requires to enclose the entire "type!.." call in single quotes - like this: