How to rectify the Error While trying to use a!save on an array type : Only fields with scalar types can be indexed from an array.

A Score Level 1

Hi All,

Need to manipulate a complex JSON from external Integration in Appian Interface, so using a Multiple CDT Structure which internally can contain multiple CDTs.

Sample Structure : 

{

{

key1:value1,

key2:{key3:value3,key4:value4},

key5:value5

},

{

key1:xx,

key2:{key3:yy,key4:zz},

key5:aa

}

}

I am unable to use a!save to store multiple array-type, giving Error:Only fields with scalar types can be indexed from an array.

I am trying to save data like this :

a!save(target:ri!data,
value:
{
dataId:local!termCode,
formulationId:null,
dataName:local!termName,
otherDataName:local!otherName
})

Process Model is not used, from interface, directly passing the cdt  to another Integration, converting to JSON as we are using External DB.

An error occurred while executing a save: java.lang.IllegalArgumentException: Cannot index "dataDetails" because it is an array type (List of CTD_Data). Only fields with scalar types can be indexed from an array.

Please Let me know how to handle this.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data