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 misunderstood that you wanted the type value (103) instead of an empty string array. I like Stefan's answer then
Also for reference, if you want a quick way in your environment to see the type numbers in Appian (we use this in a COE/internal report), plug this into an empty interface. Appian data types are ~1-300, CDTs begin at 500.
Note, never apply the try() (or any other undocumented function) in production, although it would be nice to have, it is not supported currently and may be removed at any time.
a!richTextDisplayField( label: "Data Types", value: { a!forEach( items: 1+enumerate(1500), expression: { a!richTextItem( text: concat( fv!item, " - ", /* do not use try() in production! */ try(typename(fv!item),"") ) ), char(13) } ) } )
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:
Similarly, 'type!Text?list'