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.
I have a usecase where there are two arrays : one is empty and second one has some values
Array1 : {"",""},
Array2 : {1:1,2:2}
After removing null or empty values from Array1 using filter function filter(a!isNotNullorEmpty,Array1), I have got empty array which is of List of Varient type
Now I want to apply difference function difference(Array1,Array2)
Since both are different data types, im being thrown error as invalid types.
If I have any values in Array1 like {1:1}, it would be of type List of Dictionary, but now here it is List of Varient since nothing there in the Array.
How can I perform difference function operation now? Is there any workaround to convert list of varient to list of dictionary ?
Discussion posts and replies are publicly visible
Something like this should do it.
cast(<YOUR_VALUE>, a!listType(type!Dictionary))
I tried this but it dint work.Array1 : List of Variant Assuming list of dictionariesArray2 is explicitly List of dictionariesI gave cast(array1,a!listType(recordtype))
I think that was small syntax error, try this one.
a!localVariables( local!array1: {}, local!array2: { i: 1, j: 2 }, cast(typeof({ local!array2 }), local!array1), )
Expression evaluation error at function a!listType [line 284]: Invalid type number. The type number must be an integer, type reference, or record type reference.Its throwing error for me