---
title: "Campaign Conversions"
slug: "campaign-conversions"
updated: 2026-02-26T00:55:20Z
published: 2026-02-26T00:55:20Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.technolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Campaign Conversions

This article covers converting legacy campaigns to campaigns dataset records and setting up the new campaigns dataset for using campaigns in Slate.

The basic procedure is:

1. Run the migration procedure.
2. Create a Campaign Committee Entity.
3. Create Campaigns custom tabs.
4. Create standard Fields / Prompts.
5. Create standard queries.
6. Manage dashboards.
7. Manage an express portal with the thermometer code.

## Campaign Migration Procedure

The migration procedure creates a new dataset in the database with the "gift_campaign" type. This type enables Slate to use the dataset for campaigns. Three new fields are created in the database: Goal, Start Date, and End Date. Each field is configured with the Campaigns dataset scope.

The tool recreates any existing campaigns in the basic Campaigns tool in the new Campaigns dataset. The Goal, Start Date, and End Date settings of those existing campaigns are copied into new Campaigns-scoped fields for Goal, Start Date, and End Date. The unique GUIDs of the existing campaigns are copied and used as the unique GUID for the newly created dataset record.

1. Click the **Database** icon on the Slate navigation bar, and in the **Auditing** section, select the **Cleanup / Scrub Address Records** tool. The **Database Cleanup** page appears.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16425694502555.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16425694502555.png)

2. On the right side of the page, click **Configuration Cleanup**. The **Configuration Cleanup** page appears.

3. Locate and select **Migrate Campaigns to Dataset**. A **Migrate Campaigns to Dataset** popup appears.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16425691300763.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16425691300763.png)

4. Enter some descriptive information in the *required* **Memo** field.

5. Click **Execute** to create the new campaigns dataset and migrate any existing campaigns to the dataset. **Note**: *The procedure can still be used even with no existing campaigns.*

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16425920731035.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16425920731035.png)

## Creating a Campaign Committee Entity

1. Click **Database** on the Slate navigation bar, and in the **Records and Datasets** section, select **Entities**. The **Entities** summary page appears.

2. Click **Insert** to create a new entity. An **Insert Record in Entities** popup appears.

3. Select an existing **Folder**, or select **Other** and enter a new folder name.

4. Provide a descriptive name for **Name**.

5. Set **Scope Insert** to **Dataset: Campaigns**. The selected scope appears in the **Scope** list.

> [!WARNING]
> Note
> 
> You can provide any value for **Name**. In this example (and in future articles), the entity name appears as "Campaign Committee."

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/17010735146139.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/17010735146139.png)

## Creating Campaign Fields

> [!WARNING]
> Note
> 
> To further build out the Campaigns dataset, some custom fields must be created. These fields must be manually recreated in your database and cannot be used in a Suitcase because the dataset associated with the fields is unique to your database.

**Campaign Fields**

All fields in this section will have **Scope Category** of Records and a **Scope** of Campaigns. The **Name** for each field is suggested to easily identify administratively; you can use another name if desired. If an indicated prompt does not appear in the list, select **Other** and enter the given prompt.

- Campaign Type
  - **ID**: campaign_type
  - **Name**: Campaign Type
  - **Field Type**: Single Value
  - **Prompt**: campaign_type
- Stretch Goal
  - **ID**: campaign_stretch_goal
  - **Name**: Stretch Goal
  - **Field Type**: Free Text
  - **Unique for Merging**: Do not use value for merging
  - **Data Type** (located on the **Advanced Settings** tab): Real
- Parent Campaign
  - **ID**: parent_campaign
  - **Name**: Parent Campaign
  - **Field Type**: Related Dataset Row
  - **Multiple**: Single Value
  - **Related Dataset**: Campaigns
  - **Query**: Leave blank
- Gifts to Campaign
  - **ID**: gifts_to_campaign
  - **Name**: Gifts to Campaign
  - **Field Type**: Dataset Row Query
  - **Query**: Gift – Gifts to Campaign (*Note: The query for this will not yet exist. You can leave the Query value blank and return to this field configuration after creating the query.)*
- Sub-Campaigns
  - **ID**: sub_campaigns
  - **Name**: Sub-Campaigns
  - **Field Type**: Dataset Row Query
  - **Query**: Campaigns – Sub-Campaigns (*Note: The query for this will not yet exist. You can leave the Query value blank and return to this field configuration after creating the query.)*
  - **Tab** (located on the **Display** tab): Dashboard (*Note: The tab for this will not yet exist. You can leave the value blank and return to this configuration after creating the tab.)*

**Campaign Committee** (These fields require the Campaign Committee entity to be created. All fields in this section have a **Scope Category** of Related and a **Scope** of Campaign Committee.

- Company / Foundation Record
  - **ID**: campaign_committee_cf_record
  - **Name**: Company / Foundation Record
  - **Field Type**: Related Dataset Row
  - **Multiple**: Single value
  - **Related Dataset**: Companies and Foundations
- Goal
  - **ID**: campaign_committee_goal
  - **Name**: Goal
  - **Field Type**: Free Text
  - **Unique for Merging**: Do not use value for merging
  - **Data Type** (located on the **Advanced Settings** tab): Real
- Person Record
  - **ID**: campaign_committee_person
  - **Name**: Person Record
  - **Field Type**: Related Dataset Row
  - **Multiple**: Single Value
  - **Related Dataset**: Leave blank (null) to pull in person records
- Record Type
  - **ID**: campaign_committee_record_type
  - **Name**: Record Type
  - **Field Type**: Single Value
  - **Prompt**: campaign_committee_record_type
- Role
  - **ID**: campaign_committee_role
  - **Name**: Role
  - **Field Type**: Single Value
  - **Prompt**: campaign_role
- User
  - **ID**: campaign_committee_user
  - **Name**: User
  - **Field Type**: Single Value
  - **Prompt**: user

## Creating Campaign Prompts

Tip

Default prompts can be manually added by using the Prompt Import process with the spreadsheet file attached at the end of this article.

- Prompt Key: campaign_role
  - Board Member
  - Chair
  - Co-Chair
  - Consultant
  - Planning Committee Member
  - Staff
  - Steering Committee Member
  - Volunteer
- Prompt Key: campaign_type
  - Parent Campaign
  - Standalone or Sub-Campaign
- Prompt Key: campaign_committee_record_type
  - Company / Foundation Record
  - Person Record
  - User

## Creating Campaign Custom Tabs

Campaign dataset records include two custom tabs: **Campaign Details** and **Gifts**. The **Campaign Details** tab is used to display and edit standard fields such as Goal, Start Date, End date, and Stretch Goal, and to display the **Campaign Committee** entity. The **Gifts** tab will be linked to a query to display all the gifts that have been made to the selected campaign record.

Creating custom tabs for a dataset is the same as creating custom tabs for a person record. For more information on creating custom tabs for a record, refer to the [Custom Tabs](/v1/docs/custom-tabs) Knowledge Base article.

The **Campaign Details** tab links to a form that you must create, and the **Gifts** tab links to a query that you must also create.

To create the custom tabs:

1. Click **Database** on the Slate navigation bar, and in the **Records and Datasets** section, select **Tabs**. The **Tabs** summary page appears.

Tip

Using the search function can help you locate the cleanup tool quickly.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16568070868635.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16568070868635.png)

2. Configure the tabs to be associated with the Campaigns dataset. For each tab, select a **Scope** of **Dataset**, and select the **Campaigns** value for **Dataset**.

> [!WARNING]
> Note
> 
> You can create the **Campaign Details** tab before creating the associated form. The procedure for making for form is provided later in this article.

![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16568356836507.png)

3. Two forms are required to complete the **Campaigns Details** tab: the form linked to the tab and the form for the **Campaign Committee** entity.

For the Campaign Committee entity, refer to the [Creating and Display Entities](/v1/docs/creating-and-displaying-entities) Knowledge Base article. Once the entity widget form is created, create the **Campaign Details** form. The following example describes creating the standard **Campaign Details** tab, but you can create any form that best meets your institution's requirements.

Campaign Details Form

In the form for the Campaign Details tab, the custom fields for the Campaign Type, Parent Campaign, Start Date, End Date, Goal, and Stretch Goal are set at the top of the form. These values are included on the form for easy access so that they can be updated administratively. Following this section, an instruction block is included to display information on any sub-campaigns that might be linked to the parent campaign. The widget for the Campaign Committee is placed after the instruction block.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16569037697819.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16569037697819.png)

The sub-campaign instruction block uses merge fields configured in the form's Edit Properties section. To set up the merge field:

1. From the **Forms** summary page, select the form to open it. The summary page for that form appears.

2. Click **Edit Form**. An **Edit Form** summary page appears.

3. Click **Edit Properties**. An **Edit Properties** popup appears.

4. Click the **Merge Fields** tab.

5. Add a subquery export named "subcampaigns."

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763346286491.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763346286491.png)

6. For the subquery export, set **Output** to **Dictionary**. This setting allows the code in the HTML block to return one row per sub-campaign associated with the parent campaign.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763689908379.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763689908379.png)

7. In the subquery, add two joins: one to **Parent Campaign** and one from **Parent Campaign** to **Sub-Campaigns**.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763488553883.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763488553883.png)

8. Once the joins are added, add two exports: from the **Sub-Campaigns** section, add the **Name** and **Dataset Record URL** exports.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763530146459.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763530146459.png)

9. When the exports have been added, go back and rename them. Rename the Name export to "name" and rename the Dataset Record URL export to "link." Since the exports will be used as merge fields in the instructions block, they must be HTML-friendly.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763596470299.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763596470299.png)

10. Add a sort to the subquery if desired. In the showcase example, a sort is included for **Sub-Campaigns Name**.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763789716891.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16763789716891.png)

11. With the **subcampaigns** merge field created, add an **Instructions** block to the form. If you used all the recommended names for the subcampaigns merge field, you can copy and paste the following HTML code into the source section of the instructions block to display the sub-campaigns of a parent campaign.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16764885987099.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16764885987099.png)

12. HTML code: Copy the following code and paste it into the **Source** section of the Instructions block.

```plainText
<ul>
        {% for item in subcampaigns %}
        <li>
        <a href="{{item.link}}" target="_blank">{{item.name}}</a>
        </li>
        {% endfor %}
        </ul>
```

13. Add a Widget Table and select the widget form previously created for the Campaign Committee entity.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16765181571995.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16765181571995.png)

14. When the form is complete, return to the **Tabs** tool and add the form to the **Campaign Details** tab.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16765303366939.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16765303366939.png)

#### Gifts Tab Query

The **Gifts** tab uses a field with a **Data Type** of **Dataset Row Query**. This field type displays record-related information on that record through a dashboard or tab. For more detailed information on dataset row queries, refer to the [Embedded Dataset Row Queries](/v1/docs/embedded-dataset-row-queries) Knowledge Base article.

The three basic steps to set up this tab are:

1. Create the tab (previously described).
2. Create a query to return the related information on the tab.
3. Create a custom field to link the query to the tab.

With the tab created in Step 1, the next step is to create the query:

1. Click the **Queries / Reports** icon on the Slate navigation bar and select **Queries**. The **Queries** summary page appears.

2. Click **New Query**. A **New Query** popup appears.

3. Provide the following configurations:

- **Name**: Provide a descriptive name as desired. This example uses "Gifts to Campaign."
- **Sharing**: Select the checkbox.
- **Folder**: Provide the desired folder. To place the query in the System/Tab folder, select **Other** on the main folder list, enter the word "System" in the first field, select **Other** on the subfolder list, and enter the word "Tab" in the final field.
- **Type**: Set to **Configurable Joins**.
- **Category**: Set to **Related**.
- **Base**: Set to **Gift**.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16850235805851.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16850235805851.png)

4. Click **Save**. The **Edit Query** summary page appears.

5. For this query, provide a custom parameter. This is passed to the related records GUID into the query, ensuring that the data being returned from the query is related to the record you are viewing. To set up a Custom Parameter, Click **Edit Web Service**. An **Edit Web Service** popup appears.

6. Copy the following code snippet and paste it into the **Custom Parameters** field and click **Save**.

```plainText
 <param id="record" type="uniqueidentifier" />
```

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16850652976923.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16850652976923.png)

7. In the **Joins** section of the query, click **Joins**. An **Insert Query Part** popup appears.

8. In the **Gift** section, select **Campaigns** and click **Continue**. An **Edit Part** popup appears. The default **Name** for the join is "Campaigns," but you can change the value if desired.

9. Click **Save and New**. The **Insert Query Part** popup appears.

10. In the **Gift** section, select **Donor** and click **Continue**. An **Edit Part** popup appears. The default **Name** for the join is "Donor," but you can change the value if desired.

11. Click **Save and New**. The **Insert Query Part** popup appears.

12. In the **Gift** section, select **Funds** and click **Continue**. The default **Name** for the join is "Funds," but you can change the value if desired.

13. Click **Save**.

> [!WARNING]
> Note
> 
> After migrating to the campaigns dataset, your database will include two joins: "Campaign" (singular) and "Campaigns" (plural). The "Campaign" join is to the legacy campaign tool, and the "Campaigns" join is to the new Campaigns dataset.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16851302003227.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16851302003227.png)

With the joins set up, add filters as follows:

1. In the **Filters** area of the **Edit Query** page, click **Filter**. An **Insert Query Part** popup appears.

2. In the **Campaigns** section, select GUID and click **Continue**. An **Edit Part** popup appears.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16851509466907.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16851509466907.png)

3. For the **GUID** value, enter "@record." With this value, the filter references the parameter being passed to the query. For example, if you are on a campaign record, the GUID of that campaign record is passed to the query, and the filter returns only gifts with a campaign GUID matching the GUID of the campaign record you are currently viewing.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16851622568475.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16851622568475.png)

4. Add the exports that should be returned from the query. The default query includes exports for Gift Date, Donor Name, Gift Amount, Fund Name, and (the current) Gift Status.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16851823324187.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16851823324187.png)

## Configuring the Gift Tab Field

1. With the query now created, revisit the **Gifts to Campaign** field previously described.

2. Set the **Status** to **Active**, and for the **Query** value, select the **Gifts to Campaign** configurable joins query.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16853032894619.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16853032894619.png)

3. With the query selected, click the **Display** tab, and for **Tab** value, select **Gifts**. Click **Update**.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16853066926363.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16853066926363.png)

## Creating the Campaign Summary Dashboard

The campaign dashboard includes two components: a dashboard query and a portal. Create the portal first, which will be embedded in the campaign summary dashboard.

## Creating the Campaign Summary Portal

1. Click **Database** on the Slate navigation bar, and in the **Portals** section, select **Portals**. The **Portals** summary page appears.

Tip

Using the search function can help you locate the cleanup tool quickly.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16889990899483.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16889990899483.png)

2. Click **New Portal**. An **Edit Details** popup appears.

3. Provide the following configurations:

- **Status**: Set to **Active**.
- **Name**: Give the portal a meaningful name. In this example, the portal is called "Campaign Summary."
- **Key**: Enter "campaign-summary." Using this value is recommended because the code provided in the following example can be copied and used without editing.
- **Folder**: Select an existing folder, or select **Other** and enter a new folder name.
- **Default View**: Wait to set this because you will update this value once a view is created.
- **Scope**: Set to **Anonymous/Guest**.
- **Security**: Set to **User**. (The can also be set to Anonymous/Guest, but note that if the portal is accessed outside of the Campaign Dashboard, no data be returned.)
- **Custom CSS Rules**: The following CSS code is provided for improved appearance in the campaign summary dashboard. Copy the code and paste it into the **Custom CSS Rules** section of the **Edit Details** popup.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16890539776795.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16890539776795.png)

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16890686141851.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16890686141851.png)

```plainText
 .thermometer-container {
        display: block;
        width: fit-content; /* Add this property to fit the container to its content */
        margin-left: auto;
        margin-right: auto;
        padding-bottom: 45px;
        }
        .thermometer {
        width: 50px;
        height: 300px;
        background-color: #eee;
        border-radius: 25px 25px 25px 25px;
        position: relative;
        overflow: visible;
        }
        .thermometer-fill {
        position: absolute;
        bottom: 0;
        width: 100%;
        background-color: #42b883;
        }
        .thermometer-bulb {
        width: 80px;
        height: 80px;
        background-color: #42b883;
        border-radius: 50%;
        position: absolute;
        bottom: -40px;
        left: -15px;
        z-index: 1;
        }
        .bulb-inner {
        width: 56px; /* Increase width from 50px to 56px */
        height: 56px; /* Increase height from 50px to 56px */
        background-color: #42b883;
        border-radius: 50%;
        position: absolute;
        top: 12px; /* Adjust top position from 10px to 12px */
        left: 12px; /* Adjust left position from 10px to 12px */
        }
        .bulb-percentage {
        position: absolute;
        color: #fff;
        font-size: 18px;
        font-weight: bold;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2; /* Add z-index to place the percentage text on top of the fill */
        }
        .dash_table {
        display: flex;
        flex-flow: row wrap;
        justify-content: flex-start;
        align-content: flex-start;
        }
        .dash_table > div {
        margin: 8px;
        padding: 15px;
        box-sizing: border-box;
        width: 175px;
        }
        a:link.giving_dashboard, a:visited.giving_dashboard {
        background-color: #c6c6c6;
        font-weight: bold;
        float: right;
        border: none;
        border-radius: 0;
        color: #000;
        cursor: pointer;
        display: inline-block;
        font-family: Arial,Helvetica,sans-serif,sans-serif !important;
        font-size: 12px;
        line-height: 12px;
        margin: 0 10px 0 0;
        padding: 5px 15px;
        text-decoration: none;
        }
```

4. Click **Save**. The **Campaign Summary** portal summary page appears.

## Adding the Portal View

With the portal created, add the new view.

1. In the **Views** section of the portal summary page, click **New View**. An **Edit View** popup appears.

2. Provide a meaningful name for **Name**.

3. For **Layout**, select **Dynamic Layout Editor (default)**.

4. Click **Save**. The layout editor for the portal appears.

5. From the right side of the page, select or drag New Row to the desired location. A Select Row Layout popup appears.

6. Select one of the row formats.

This example uses the Narrow and Wide Columns option, with the intent of displaying the graphical campaign thermometer in the narrow column on the left and the campaign details in the wide column on the right. (Remember, though, that this is your portal, so use the layout that best fits your requirements.)

In the example, both the narrow and wide columns include static content blocks. Two sets of HTML code are provided in the following code block: one set for the campaign thermometer and one set for the campaign information. This HTML code can be copied and pasted into the source section of the Static Content blocks.

> [!WARNING]
> Note
> 
> Both sets of HTML code include merge fields; if you use the query method as provided in the example exports, there will be no need to edit the HTML code.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16892978839195.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16892978839195.png)

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16893114253083.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16893114253083.png)

7. Use the following code to replace any default HTML code that loads in the Source tool. This example HTML code already includes the appropriate header and body layout.

Thermometer HTML Code

```plainText
 <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <title></title>
        </head>
        <body>
        <div class="thermometer-container">
        <div class="thermometer">
        <div class="thermometer-fill" id="thermometer-fill">
        </div>

        <div class="thermometer-bulb">
        <div class="bulb-inner">
        </div>
        </div>

        <div class="bulb-percentage" id="bulb-percentage">
        {{progress-percentage}}%
        </div>
        </div>
        </div>
        <script>
        window.addEventListener('DOMContentLoaded', (event) => {
        const progress = {{progress-percentage}};
        updateThermometer(progress);
        });

        function updateThermometer(progress) {
        const thermometerFill = document.getElementById('thermometer-fill');
        const bulbPercentage = document.getElementById('bulb-percentage');

        const bulbHeight = 40; // Height of the bulb (in pixels)
        const tubeHeight = 245; // Height of the tube without the bulb (in pixels)
        const fillHeight = (progress * tubeHeight / 100) + bulbHeight;

        const animationDuration = 2000; // Animation duration in milliseconds, adjust as needed

        let start = null;
        function step(timestamp) {
        if (!start) start = timestamp;
        const elapsedProgress = Math.min((timestamp - start) / animationDuration, 1);
        const currentHeight = elapsedProgress * fillHeight;
        const currentPercentage = Math.round(elapsedProgress * progress);

        thermometerFill.style.height = `${currentHeight}px`;
        bulbPercentage.style.bottom = `${currentHeight - 20}px`;
        bulbPercentage.textContent = `${currentPercentage}%`;

        if (elapsedProgress < 1) {
        requestAnimationFrame(step);
        }
        }

        requestAnimationFrame(step);
        }
        </script>
        </body>
        </html>
```

Campaign Information HTML Code

```plainText
 <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <title></title>
        </head>
        <body>
        <div class="dash_table">
        <div style="border:1px solid #ccc;padding:10px;border-radius:5px;">
        <b>Goal</b>
        <div style="color:#00669e;font-size:1.25em;margin:5px 0;">
        {{goal}}
        </div>
        </div>

        <div style="border:1px solid #ccc;padding:10px;border-radius:5px;">
        <b>Total Raised</b>

        <div style="color:#00669e;font-size:1.25em;margin:5px 0;">
        {{progress-total}}
        </div>
        </div>

        <div style="border:1px solid #ccc;padding:10px;border-radius:5px;">
        <b>Largest Received Gift</b>

        <div style="color:#00669e;font-size:1.25em;margin:5px 0;">
        {{largest-gift}}
        </div>
        <span class="detail">Donor: {{largest-donor}}</span>
        </div>
        </div>
        </body>
        </html>
```

## Adding the Portal Method

With the portal view created, add the portal method. The portal method is used to identify the record that the portal is displaying and to specify the record's information that should appear in the portal. In this example, the record is a campaign.

1. On the portal summary page, in the **Methods** area, click **New Method**. An **Edit Details** popup appears.

2. Provide the following configurations:

- **Name**: Give the method a meaningful name.
- **Type**: Set to **GET**.
- **Output Type**: Set to **Default Branding**.
- **Page Title**: Leave blank.
- **Action**: Leave blank.
- **View**: Enter the name of the view previously created. In the example, the view has a value of "Home."

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16897758480027.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16897758480027.png)

3. Click **Save**. A summary page for the portal method appears.

## Adding the Method Query

1. On the right side of the portal method summary page, click **Create New Query**. A **New Query** popup appears.

2. Provide the following configurations:

- **Name**: Give the query a meaningful name.
- **Type**: Set to **Configurable Joins**.
- **Category**: Set to **Records**.
- **Base**: Set to **Campaigns**.

3. Click **Save**. The query summary page appears.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16900263195163.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16900263195163.png)

4. On the right side of the page, click **Edit Parameters**. An **Edit Parameters** popup appears.

5. Copy the following code and paste it into the **Parameters** section. This code creates a parameter called "id" that will be used in the query filters and exports, enabling the query to link to the campaign record being viewed on the dashboard.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16919406330907.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16919406330907.png)

Parameter Code:

```plainText
<param id="id" type="record" />
```

6. Click **Save**.

## Adding the Method Query Filters

1. Once the parameter is created, remove the **Portal Identity** filter that was added by default.

2. Click **Filter**. An **Insert Query Part** popup appears.

3. In the **Campaigns** section, select the **GUID** filter and click **Continue**. An **Edit Part** popup appears.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16919750512155.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16919750512155.png)

4. For the **GUID** value, enter "@id." When the portal loads on a campaign record, "@id" will return the GUID of the campaign record. This ensures that the information being returned in the portal method query is the information associated with the campaign record.

5. Click **Save**.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16919981760667.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16919981760667.png)

## Adding Method Query Exports

The following example lists the exports previously added to the example standard method query. The names of the exports should be renamed to match the recommended ones shown, preventing having to change any of the HTML code used in the portal view example.

Name and Goal are the exports added directly from the **Campaigns** section in **Exports**. In this example, "Name" is renamed to "name," and "Goal" is renamed to "goal." After adding each export, double-click it to change the name.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16920748913435.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16920748913435.png)

#### Creating the "progress-total" Export

1. Add a subquery export to the method query. Use the following configurations:

- **Name**: progress-total
- **Output**: Aggregate
- **Aggregate**: Sum
- **Format Mask**: C (for currency)

This export adds the amounts of planned, pledged, and received gifts for the campaign, including hard credits that have not been reversed.

2. Configure the progress-total subquery in the subquery join to Gifts. In the **Exports** section of the subquery, add the Gifts Amount export. In the **Filters** section of the subquery, add the following filters:

- **Status Category**: Filter for the values of Planned, Pledged, and Received.
- **Credit Type**: Filter for the value of Hard Credit.
- **Reversal/Correction**: Filter for the value of Not Reversal/Correct Entry.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16921610988827.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16921610988827.png)

#### Creating the "received-total" Export

1. Add a subquery export to the method query. Use the following configurations:

- **Name**: received-total
- **Output**: Aggregate
- **Aggregate**: Sum
- **Format Mask**: C (for currency)

This export adds the amounts of received gifts for the campaign that are also hard credits that have not been reversed.

2. Configure the "received-total" subquery in the subquery join to Gifts. In the **Exports** section of the subquery, add the Gifts Amount export. In the **Filters** section of the subquery, add the following filters:

- **Status Category**: Filter for the values of Received.
- **Credit Type**: Filter for the value of Hard Credit.
- **Reversal/Correction**: Filter for the value of Not Reversal/Correct Entry.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16928041920411.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16928041920411.png)

#### Creating the "pledged-total" Export

1. Add a subquery export to the method query. Use the following configurations:

- **Name**: pledged-total
- **Output**: Aggregate
- **Aggregate**: Sum
- **Format Mask**: C (for currency)

This export adds the amounts of pledged gifts for the campaign that are also hard credits.

2. Additionally, configure the "pledged-total" subquery in the subquery join to Gifts. In the **Exports** section of the subquery, add the Gifts Amount export. In the **Filters** section of the subquery, add the following filters:

- **Status Category**: Filter for the values of Pledged.
- **Credit Type**: Filter for the value of Hard Credit.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16928230266267.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16928230266267.png)

#### Creating the "largest-gift" Export

1. Add a subquery export to the method query. Use the following configurations:

- **Name**: largest-gift
- **Output**: Rank
- **Row Offset**: 1

This export returns the largest received gifts for the campaign that are also hard credits that have not been reversed.

2. Configure the "largest-gift" subquery in the subquery join to Gifts. In the **Exports** section of the subquery, add the Gifts Amount export. In the **Filters** section of the subquery, add the following filters:

- **Status Category**: Filter for the values of Received.
- **Credit Type**: Filter for the value of Hard Credit.
- **Reversal/Correction**: Filter for the value of Not Reversal/Correct Entry.

3. To be sure that the largest gift is returned as the rank-1 gift, add a sort to the subquery export of the Gifts Amount in descending sort order.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16928650515867.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16928650515867.png)

#### Creating the "largest-donor" Export

1. Add a subquery export to the method query. Use the following configurations:

- **Name**: largest-donor
- **Output**: Rank
- **Row Offset**: 1

This export returns the name of the donor who has given the largest gift to the campaign, where the gift is also a hard credit that has not been reversed.

2. Configure the "largest-donor" subquery in the subquery join to Gifts, and then join from Gifts to Donor. In the **Exports** section of the subquery, add the Donor Name export. In the **Filters** section of the subquery, add the following filters:

- **Status Category**: Filter for the values of Received.
- **Credit Type**: Filter for the value of Hard Credit.
- **Reversal/Correction**: Filter for the value of Not Reversal/Correct Entry.

3. To be sure that the largest donor is returned as the rank-1 gift, add a sort to the subquery export of the Gifts Amount in descending sort order.

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16929279173915.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16929279173915.png)

#### Creating the "progress-percentage" Export

1. Add a subquery export to the method query. Use the following configurations:

- **Name**: progress-percentage
- **Output**: Formula
- **Row Offset**: 1

This export calculates the percentage of the gifts given toward the campaign goal.

2. To calculate the **Formula**, two exports are needed, and both must have a name formatted to work in a formula. Use the formula in the following example. Name the exports as shown to avoid having to edit the formula.

```plainText
 (@progress-total / @goal) * 100
```

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16930321850651.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16930321850651.png)

**Export 1**: goal

The "goal" export is a modified version of the Campaigns Goal standard export. Add the export and double-click it to change the following configurations:

- **Name**: goal
- **Format Type**: Money

[![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16930301485211.png)](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/16930301485211.png)

**Export 2**: progress-total

To create the "progress-total" export:

1. Add a subquery query export. Use the following configurations:

- **Name**: progress-total
- **Output**: Aggregate
- **Aggregate**: Sum

2. In the **Exports** section, join to Gifts, and add the Gifts Amount as an export.

3. In the **Filters** section, add the following filters:

- **Status Category**: Filter for the values of Planned, Pledged, and Received.
- **Credit Type**: Filter for the value of Hard Credit.
- **Reversal/Correction**: Filter for the value of Not Reversal/Correct Entry.

<editor360-custom-block data-preprocessing="true" data-sanitizationtags="div"><div class="file-Name" data-type="attachment-content" title="campaign_prompt_import.xlsx"><a href="https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/campaign_prompt_import.xlsx" rel="noopener">campaign_prompt_import.xlsx</a></div></editor360-custom-block>
