03-26-2020 07:16 AM
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!
07-02-2020 04:00 AM
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>
07-02-2020 04:12 AM
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)
Explore our Alfresco products with the links below. Use labels to filter content by product module.