---
title: "How to Display Custom Fields in the Persona Card"
slug: "add-custom-field-to-persona-card"
updated: 2025-09-04T04:59:12Z
published: 2025-09-04T04:59:12Z
canonical: "docs.powerworker.com/add-custom-field-to-persona-card"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.powerworker.com/llms.txt
> Use this file to discover all available pages before exploring further.
# How to Display Custom Fields in the Persona Card
This guide explains how to configure Persona Card templates by adding custom fields into the FetchXML query, mapping them into App Settings, and referencing them within the Persona Card configuration.

In this example, we will use a custom field added to the Bookable Resource entity named **vel_deanscustomfield**.

#### 1. Add the field to the FetchXML App Setting
Update the **Roster/RosterPCF/PositionAllocationsFetchXml** App Setting to include the new field. This ensures the API returns the field value, making it accessible to other configurations.
Example FetchXML with **vel_deanscustomfield** included:
```xml
```
#### 2. Map the field in the CustomFields App Setting
Next, add the field to the **Roster/RosterPCF/CustomFields** App Setting. This step maps the FetchXML result into an object you can reference in Persona Cards.
Notice that the **resource.** prefix matches the alias defined in the FetchXML query.
```json
[
{
"name": "vel_shiftopen",
"type": "boolean",
"label": "Shift Open",
"allowGrouping": true
},
{
"name": "resource.vel_deanscustomfield",
"type": "string",
"label": "custom field",
"allowGrouping": true
}
]
```
The **allowGrouping** setting can remain enabled or disabled; it does not impact the Persona Card configuration.
#### 3. Configure the Persona Card Template
The **Roster/RosterPCF/PersonaCardConfig** App Setting controls the layout of text displayed on each Persona Card.
This setting accepts JavaScript expressions for primary, secondary, and tertiary text, as well as an HTML template.
Below is an example where the custom field is included in the tertiary text:
```json
{
"primaryText": "(row, rosterSettings) => row.totalRowHours",
"secondaryText": "(row, rosterSettings) => row.resource?.name || ''",
"tertiaryText": "(row, rosterSettings) =>row.PositionAllocation?.CustomFields?.['resource.vel_deanscustomfield'].value || 'No Custom Value'",
"template": "
{{primaryText}} {{secondaryText}}
{{tertiaryText}}
"
}
```
- primaryText – shows the total row hours
- secondaryText – shows the resource’s name
- tertiaryText – shows the custom field, with a fallback label if no value exists
- template – combines all text into the card display
Once configured, the custom field will appear directly on the Persona Card in the Roster Calendar.