> For the complete documentation index, see [llms.txt](https://support.pears.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.pears.io/engage/program-activities/link-an-event-to-a-program-activity.md).

# Link an Event to a Program Activity

Learn how to link an existing community event to a program activity in PEARS, what the link does, and how to unlink an event.

If your organization uses the Community Events module, each program activity can be linked to one community event. Linking connects the direct education record to the event participants registered for, so the two records point to each other and event registrations can be used to calculate the program activity's demographics.

You can link the two records from either side. This article covers linking from the program activity. To link from the event, or to create a program activity from an event, see [Link a Program Activity to an Event](https://support.pears.io/plan/community-events/link-a-program-activity-to-an-event.md).

## Before You Begin

* Your organization must have the Community Events module turned on. This is the **Use Event Management Module** setting under **Events** in [Organization Settings](https://support.pears.io/administration/administration/organization-settings.md). Organization Administrators cannot change it there; contact PEARS Support to turn it on.
* You need a Role that lets you work with community events, such as **Manage Own Events**, **View All Events**, **Publish Free Events**, or **Publish Paid Events** (see [Event Permissions](https://support.pears.io/plan/community-events.md#event-permissions)). Without it, the **Event** card does not appear until an event is linked.
* The community event must already exist, and you must be able to view it. To create one, see [Create a Community Event](https://support.pears.io/plan/community-events/create-a-community-event.md). To have PEARS create and link one for you from the program activity, see [Create an Event from a Program Activity](https://support.pears.io/engage/program-activities/create-an-event-from-a-program-activity.md).
* You must be able to edit the program activity. It must be saved, not marked as complete, and not in a closed reporting period (unless you have permission to edit past reporting period data). Otherwise the **Link Existing** button is hidden.

{% stepper %}
{% step %}

#### Open the Program Activity

From the PEARS homepage, hover over the **Engage** menu in the top navigation bar and click **Program Activities**. Click the program activity to open its detail page.
{% endstep %}

{% step %}

#### Click Link Existing

In the right column of the detail page, below the **Progress** panel, find the **Event** card and click the **Link Existing** button. The **Link Existing Event** dialog box appears.
{% endstep %}

{% step %}

#### Select the Event

In the **Event** field, type part of the event's name or its ID and select the event from the matching options. Each option shows the event's ID, dates, and status. The search tolerates small typos.

When you select an event, its details appear below the field (name, ID, status, dates, program areas, unit, site, and delivery method) so you can check that it is the right one before linking.

{% hint style="info" %}
**TIP:** The list shows only events in your organization that you can view, that are not canceled, and that are not already linked to another program activity. Each event can be linked to one program activity, and each program activity to one event. If an event you expect is missing, check whether it is already linked elsewhere.
{% endhint %}
{% endstep %}

{% step %}

#### Click Link Event

Click the **Link Event** button. The link is saved immediately; there is no separate Save step. Linking does not change any fields on the event. PEARS confirms that the event was linked, and the **Event** card now shows the linked event.
{% endstep %}
{% endstepper %}

## After You Link an Event

The **Event** card shows the linked event's name, its start and end dates, and its status (**Draft**, **Published**, or **Canceled**). The card offers two actions:

* **View Event** — opens the event's detail page in a new tab.
* **Unlink** — removes the link. See [Unlink an Event](#unlink-an-event).

The card appears below the **Progress** panel on the program activity's detail page and its workflow pages: General Information, Collaborators, Custom Data, Evaluation, and Demographics. Users who do not have Community Events permissions see the card only once an event is linked, and cannot unlink it. If you cannot view the linked event, the card shows only its name and ID, with the message **You don't have access to view this Event.** in place of the **View Event** button.

### Calculate Demographics from Event Registrations

When the linked event has at least one registration type with registrations and the program activity is in a 2023 or later reporting period, the program activity's Demographics page can fill in participant demographics from the event's registration data:

1. On the Demographics page, click **Auto Calculate**.
2. Select **Event registrations attached to this program** and click **Continue**.
3. If the event has more than one registration type, select the one to use.
4. Check **I only want to include demographics of people who attended the event** to count only participants marked as attended. Check **I would like to add new demographic data to existing demographic values instead of replacing them** to add to values already entered rather than overwrite them.
5. Click **Yes**.

See [Auto Calculate Program Activity Demographics](https://support.pears.io/engage/program-activities/auto-calculate-demographics.md) for the other available data sources.

### Where the Link Appears

The link is stored on the program activity record. It is not included in the Program Activities [Export](https://support.pears.io/engage/program-activities/export.md). The Data Mart's program activity table includes the linked event's ID.

{% hint style="warning" %}
**NOTE:** If you delete a program activity that has a linked event, PEARS lists the event as a warning on the confirmation page. Deleting the program activity does not delete the event, and deleting the event does not delete the program activity; the two are simply unlinked.
{% endhint %}

## Unlink an Event

To remove the link, click **Unlink** on the **Event** card. The **Unlink Event** dialog box asks you to confirm; click **Unlink**. PEARS confirms that the event was unlinked, and the card shows its **Link Existing** and **Create Event** buttons again so you can link a different event or create a new one.

The **Unlink** button is hidden when the program activity is complete or in a closed reporting period, when the event is canceled, or when you cannot view the event. You can also unlink from the event's side; see [Link a Program Activity to an Event](https://support.pears.io/plan/community-events/link-a-program-activity-to-an-event.md#unlink-a-program-activity).

Unlinking only removes the connection between the two records. The community event, its sessions, and its registrations are not changed, and any demographics already calculated on the program activity are kept.
