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.

Single List of Variant which contains a dictionary array. How to index/access the list of dictionary?

Hi guys, this is a daft question but I can't for the life of me figure this out. I have an API response which I've indexed to retrieve the required data. If I output this indexed data, it's showing as the following format:

List of Variant (1 item)

List of Dictionary (3 items)

Dictionary

id 1 (Integer)

name "Alice" (Text)

Dictionary

id 2 (Integer)

name "Gail" (Text)

Dictionary

id 3 (Integer)

name "Kelly" (Text)

I'm trying to cast the above into a list of CDT, like so:

a!forEach(
    local!apiResponse,
    'type!{urn:com:appian:types:test}Customer'(
      customerName: fv!item.name
    )
  )

If I do that, instead of 3 Customer CDT's with a name in each, i.e.:

List of Customer - 3 items

    • Customer
        • customerName"Alice"(Text)
      • Customer
          • customerName"Gail"(Text)
          • Customer
              • customerName"Kelly"(Text)

            I'm getting one Customer CDT with all 3 names as a list in the one customerName field i.e:

            List of Customer - 1 item

              • Customer
                  • customerName"Alice; Gail; Kelly"(Text)

                I guess it's because I'm trying to perform the a!forEach on the single List of Variant, but how do I index into it to perform the forEach on the list of dictionaries within instead?

                Thanks for any help!

                  Discussion posts and replies are publicly visible

                Parents Reply Children
                No Data