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.

Is it possible to fetch a CDT field by numerical index?

Hi all,

I want to get fields in a CDT based on their numerical index, i.e. if I have a CDT like:

{'type!{urn:com:appian:types:TEST}TEST_Employee'('firstName': "Frank", 'secondName': "Smith", 'age': 29)}

To get the first field, is there a way to index it by number? Something like index(local!testCdt, 1, null) would return "Frank". 

Thanks for your help!

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    in reply to johng0005
    How would I keep this persisted in a key-value fashion?

    You can do pretty much whatever you want if you use an expression rule, FWIW Sunglasses

    The beauty of that is, you can design an expression rule using a "black box" approach, such that you can start out with hardcoded or even "faked" values, and if/when you decide to shift to a DB-backed approach, you can simply update that expression rule to do whatever internal querying it needs to do, in order to return the same values based on the input passed in.