Data-columns keys

cancel
Showing results for 
Search instead for 
Did you mean: 
PiotrK
Customer

Data-columns keys

Hi,

I'm having trouble displaying task and process properties in data-columns in adf-tasklist and adf-process-instance-list. Tried key values from ProcessInstanceModel. For the startedBy property, [object Object] is displayed:

<adf-process-instance-list>
   <data-columns>
      <data-column key="name" title="Process Name"></data-column>
      <data-column key="id" title="Id"></data-column>
      <data-column key="started" title="Started"></data-column>
      <data-column key="startedBy" title="Started by"></data-column>
   </data-columns>
</adf-process-instance-list>

For the adf-tasklist I tried TaskDetailsModel:

<adf-tasklist>
   <data-columns>
      <data-column key="name" title="Task Name" ></data-column>
      <data-column key="id" title="Task Id" ></data-column>
      <data-column key="created" title="Created"></data-column>
      <data-column key="processInstanceId" title="Process Id"></data-column>
      <data-column key="processInstanceName" title="Process name"></data-column>
      <data-column key="assignee" title="Assignee"></data-column>
   </data-columns>
</adf-tasklist>

The ProcessInstanceName property is not displayed at all. For the assignee property, [object Object] is displayed.

Where can I find the correct key values?

Thanks!

2 Replies
mrccrds
Member II

Re: Data-columns keys

Hi,

 

The following keys worked for me.

<data-column key="assignee.firstName" title="Assignee's first name"></data-column>
<data-column key="assignee.lastName" title="Assignee's last name"></data-column>

 

dvuika
Alfresco Employee

Re: Data-columns keys

Many payload properties are complex objects, like User for example, that may have firstName, lastName and other properties. You can use long paths in the data column keys.

There are tree ways to address this:

- check the ACS rest api docs to see what payloads contain

- use browser dev tools to see the network responses and figure out what properties the object has

- check the ADF documentation or examples (the Content Application has plenty of columns already defined: https://github.com/Alfresco/alfresco-content-app/blob/develop/src/app.config.json)