Access property in Item Data

I have a Container with Dynamic List Behaviour activated. I would like to add some logic to a specific UI element inside the Cell, which is inside a Row and Container. I know how to do this, but I don’t know how to access a property (e.g. type.name) inside the Item Data Codeless Context Block, since Item Data is some kind of Proxy … :thinking:

Proxy {created: 1642073260183, ___class: 'FormField', label: 'Name', ownerId: null, type: {…}, …}
  [[Handler]]: Object
  [[Target]]: Object
    created: 1642073260183
    label: "Name"
    objectId: "829BD435-DFF7-43FE-98E8-F042517BB138"
    ownerId: null
    type:
      created: 1642073071833
      name: "Input"
      objectId: "17F32E39-5E12-4ADA-A952-DDFB9B497738"
      ownerId: null
      updated: null
      ___class: "FormFieldType"
      Symbol(initedProxy): Proxy {name: 'Input', ___class: 'FormFieldType', ownerId: null, updated: null, created: 1642073071833, …}
    [[Prototype]]: Object
    updated: null
    ___class: "FormField"
    Symbol(initedProxy): Proxy {created: 1642073260183, ___class: 'FormField', label: 'Name', ownerId: null, type: {…}, …}
    [[Prototype]]: Object
  [[IsRevoked]]: false

Can anyone help me out here?

Figured it out myself. it has nothing to do with the Proxy thing. I was just not accessing the property the right way …

This is working for me:

But I wonder, if there is a more elegant way to get the property of a nested object. :thinking:

I think more elegant could be only with native code.

Hi @Dima_Vak
I also often struggle with the ugly nesting of Get property. Why don’t you allow the usual dot-notation, like Get property "name.type"?
By the way: dot notation works well for binding data to UI fields (Value logic).

Regards,

Hi Klaas,

Indeed, nesting of the Get Property blocks is very clumsy. We will think about how to add support for the dot-notation in the block. For tracking purposes the internal ticket is BKNDLSS-27451

Regards,
Mark

1 Like