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 all,I have a requirement to add all arrays (say array1,array2, and array3 ) and display them in 3 lines,Exmple : Country:{"India","china","USA"},State:{"Bangalore","Fujian","Texas"}Language:{"Kannada","Mandarin","English"}
I used merge and joinarray functions,joinarray(merge(local!Country,local!state,local!language),"-")required op in three separate lines as below:india - bangalore - kannada china - Fujian - Mandarinusa - texas - EnglishHow this can be achieved. Any suggestions will be appreciated.
Discussion posts and replies are publicly visible
a!localVariables( local!Country:{"India","china","USA"}, local!State:{"Bangalore","Fujian","Texas"}, local!Language:{"Kannada","Mandarin","English"}, a!forEach( items: merge(local!Country,local!state,local!language), expression: joinarray( fv!item, " - " ) ) )
There seem to be some assumptions here you're not stating. Is the ordering / length of the 3 arrays expected to always be matching / consistent? I.e. the first entry in the "countries" array will always match the first one in "states" and likewise with "languages", etc?
If so, it seems like your initial setup might be improved (if possible) - instead of a random assortment of arrays, why aren't we starting out with a list of dictionary / CDT / map, with structured data? i.e.
local!dataList: { a!map(country: "USA", state: "Texas", language: "English), a!map(country: "China"....), ... },
That'd make it quite a bit more straightforward to display the info you want to have displayed, without the necessary guesswork and (imho) sloppy merge() operations necessary.