Get Array Value from CDT - Only fields with scalar types can be indexed from an array.

I am trying to take the value from a CDT that is an array of other CDT's and set that array into a new object but I receive this error:

Only fields with scalar types can be indexed from an array.

Here is the CDT structure:

Object1 (ComplexObjectType)

-id (integer)

-values (list of ValueTypes - another CDT)

I am trying to take the entire list of values and set into a new ComplexObjectType called Object2.

This is my code:

Object2: 'type!{namespace}ComplexObjectType'(
id: local!newId,
values: local!Object1.values 
)
)

How do I do this?

  Discussion posts and replies are publicly visible