# Pitchly Slides Syntax Guide

## Introduction

Using the Pitchly Slides app, you can insert variable data into existing Microsoft PowerPoint documents. This allows you to generate hundreds or thousands of slides easily with certain changing data between them.

All that's required to get started using the Slides app is to upload a PowerPoint document which will serve as your template. Before you upload your template, however, you will need to include the placeholders for where you want your data to go. This guide will assume you already have a database in Pitchly set up and that you have fields you would like to reference.

After your template is uploaded, you can export documents (complete with data) by selecting a row from the database and clicking **Export** in the Slides app for the document you wish to export.

{% hint style="info" %}
**Note:** Each exported document in Slides will use exactly one row of data from the database row you select prior to export. In situations where you would like to iterate on a list of information *inside* of a document, to generate a bulleted list for example, you can do so by using **Reference Multiple** fields inside your database. Syntax for that can be found below.
{% endhint %}

## Placeholders

When creating a template in PowerPoint, it's important to keep in mind the data you will be including in your template. Since each slide will correlate to exactly one row of data, you would want to upload the slide template to the table that contains the root of all the information you need.

For example, if you're generating slides for a new project, you would probably want to upload your template to the **Projects** table. Within the template, you will reference data by the **Field Name** so that each placeholder will be filled with the value in the selected row for that named field.

The placeholder syntax for each field type is below.

{% hint style="info" %}
Note: When putting field names in placeholders, the field name must always be **capitalized** and surrounded by **curly brackets**. Spaces and non-alphanumeric characters must also be replaced with an underscore (\_).

Example: The field name "**My Field #5**" would become `{MY_FIELD__5}` if used in a placeholder.
{% endhint %}

### Single-line text

```
{FIELD_NAME}
```

### Number

```
{FIELD_NAME}
```

### Yes/No

If you want to show "Yes" if the value in the field is **true**:

```
{#FIELD_NAME}Yes{/FIELD_NAME}
```

If you want to show "No" if the value in the field is **false**:

```
{^FIELD_NAME}No{/FIELD_NAME}
```

{% hint style="info" %}
The `^` symbol acts as the inverse to `#`. If you want to show either **Yes** or **No** depending on whether the value is **true** or **false**, you can simply put the two lines directly next to each other on the same line. The content in the `true` block will be shown, while a `false` block will not.

Using `{FIELD_NAME}` by itself on a yes/no value will show either "true" or "false".
{% endhint %}

### Multi-line text

```
{FIELD_NAME}
```

{% hint style="info" %}
The value will retain line breaks
{% endhint %}

### Multi-line text, Rollup, Formula (Bulleted List)

{#FIELD\_NAME\_BULLET}

* **{TEXT}**

{/FIELD\_NAME\_BULLET}

Using the text field, the above renders each line of data as a bulleted list. You can separate each value in Pitchly by listing out the text into new lines in the Multi-line text box.\
Make sure that you include “\_BULLET” at the end of your field name in your syntax so your slide knows to add bullets.

### Multi-line text (overflow)

{:FIELD\_NAME\_0\_ISHOWN}

{FIELD\_NAME\_0}&#x20;

For a reference field:

{#REFTABLE}&#x20;

{:REFTABLE.FIELD\_NAME\_0\_ISHOWN}&#x20;

{FIELD\_NAME\_0}&#x20;

{/REFTABLE}

Using a multi-line text field along with the two new settings on a template seen below,![](/files/f4ZAFyp166ORM8ji569R)

### Add Template

When adding the template to the Slides app, you will be prompted to fill out the following fields with the max amount of characters (with spaces) allowed per slide per textbox. The slide will break, however, on a whole word basis.

![](/files/f4ZAFyp166ORM8ji569R)

### Dropdown

```
{FIELD_NAME}
```

### Dropdown multiple

```
{#FIELD_NAME}
 • {.}
{/FIELD_NAME}
```

{% hint style="info" %}
The above renders each value in a bulleted list, but you can separate each value however you wish. A comma-separated list, for example, would consist of putting the syntax on one line with a comma after each value.

`{#FIELD_NAME}{.}, {/FIELD_NAME}`
{% endhint %}

```
{FIELD_NAME_STRING}
Above is a simpler way to get a comma delimited list without a trailing ,.
```

### Date

```
{FIELD_NAME}
```

{% hint style="info" %}
Will show the date in the format `MM/DD/YYYY`
{% endhint %}

### Currency

```
{FIELD_NAME}
```

{% hint style="info" %}
Will include the currency symbol before the number
{% endhint %}

### Image (attachment)

```
{%FIELD_NAME}
```

{% hint style="warning" %}
The value in this attachment field must be an **image.** Syntax for the image must be living in its own text box.
{% endhint %}

By default, an image in the attachment field will be shown at its original size, but you can change the size using the **size** parameter.

```
{%FIELD_NAME | size:100:200}
```

The first value in the **size** parameter indicates ***width*** in pixels, while the other indicates ***height*** in pixels. Both values are required.

When both **size** values are greater than 0, the size of the image will be stretched to fit those dimensions. If one of them is set to 0, the image will be scaled to fit the other given dimension but maintain the original aspect ratio.

For example, `{%FIELD_NAME | size:100:0}` for an image that is 200px wide and 300px high will show an image with a width of 100px and a calculated height of 150px.

### Reference

```
{#FIELD_NAME}
    {REFERENCED_FIELD_1}
    {REFERENCED_FIELD_2}
    {REFERENCED_FIELD_3}
{/FIELD_NAME}
```

References can be a little tricky to understand at first, but when used in a document template, they can be extremely powerful ways to iterate over data.

The best way to describe how to use references is with an example. Imagine you have three tables:

![](/files/EaUL7QYyhsGGqLHAT2mE)

Imagine you are generating a slide for a new **Project**. Inside of that slide, you want to include information about the client and the account "owner" who manages that client account.

To show just the information about the **Client**, you can do this:

```
{#CLIENT}
    Our client, {NAME}, works in the field of {INDUSTRY}.
{/CLIENT}
```

This will display the client's name and industry.

To also display information about the **Employee** who manages (or "owns") that client account:

```
{#CLIENT}
    Our client, {NAME}, works in the field of {INDUSTRY}.
    {#OWNER}
        For questions, contact {NAME} at {EMAIL} or via phone at {PHONE}.
    {/OWNER}
{/CLIENT}
```

{% hint style="info" %}
If you want to quickly reference nested values in a reference without the ceremony of nesting content blocks, you can also refer to a single value like this (note that this does not work for reference multiple field types):

`{CLIENT.OWNER.NAME}`
{% endhint %}

### Reference multiple

Reference multiple fields behave identically to [References](broken://pages/-LyogHCjmld6gssqcw8U#reference), except that the *iterative block* will loop over each value.

Using the example above, imagine a Project can instead have multiple **Clients**, and this new Clients field is a reference multiple. The following:

```
{#CLIENTS}
    Our client, {NAME}, works in the field of {INDUSTRY}.
{/CLIENTS}
```

Could display as:

```
Our client, Apple, works in the field of Technology.
Our client, AT&T, works in the field of Telecommunications.
Our client, Farmers Insurance, works in the field of Insurance.
```

The same applies to any nested reference multiple fields.

{% hint style="warning" %}
**Note:** References can be nested up to 5 times. Tables with many references can increase the load time of an export exponentially, so be careful when using many references or your exports may become very slow.
{% endhint %}

### Reference Multiple Selections to a New Slide

The following syntax allows you to generate a new slide for each reference multiple selection – similar to a page break.

{:this | recur:“FIELD\_NAME”}

{FIELD\_NAME.REFERENCED\_FIELD\_1}

{FIELD\_NAME.REFERENCED\_FIELD\_2}

{FIELD\_NAME.REFERENCED\_FIELD\_3}

**Create multiple versions of slides using reference multiples**

Data can also be looped across more than one reference multiple field to create variations of selected data points. You can achieve this by building upon the above syntax. Simply add a semicolon and the name of the additional reference multiple field.

![new slides photo](https://support.pitchly.com/hs-fs/hubfs/new%20slides%20photo.png?width=688\&name=new%20slides%20photo.png)

Using this example syntax produces three slides for each team member, with each slide containing a different company name and logo. A total of nine variations are produced in a single PowerPoint export.

### Reference image

To use an attachment image from a referenced field in the Slides application, use the following syntax (where the second field after the dot is in a referenced table; and contains the image):

```
{%FIELD_NAME.LOGO}
```

Adjustments to the size can still be made, as detailed in the [Image (attachment)](https://docs.pitchly.com/proposals/#image-attachment) section, by adding the desired width and height parameters.

```
{%FIELD_NAME.LOGO | size:100:200}
```

Reference images can also be more than one level deep.  For example:&#x20;

```
{%TESTIMONIALS.CLIENT_NAME.LOGO | size:0:45}
```

## Conditional Logic

You can hide or show content depending on whether it exists by wrapping it in a conditional block.

```
{#FIELD_NAME}
    {INNER_FIELD}
{/FIELD_NAME}
```

If the value of **FIELD\_NAME** is either `false` or `empty`, the content inside the block will not be shown.

## Helpers

There are also helper functions available to help you transform values before showing them in your page.

We currently support two, the **uppercase** function and the **hyperlink** function, but we can add more [upon request](https://pitchly.com/contact).

### uppercase

Adding `| uppercase` to a text field will convert the text value to all uppercase letters.

```
{FIELD_NAME | uppercase}
```

### hyperlink

Live hyperlinks can be exported to PowerPoint using either of the below options.

* Using a URL stored in the database to hyperlink text stored in the database.&#x20;

This method requires two text fields. One field to store the text you wish to display in the document and one field to store the URL for the hyperlink.\
{\~\~ DISPLAY\_TEXT\_FIELD\_NAME | hyperlink: URL\_FIELD\_NAME }

* Using a URL stored in the database to hyperlink text stored within the PowerPoint document.&#x20;

This method requires one text field to store the URL. Enclose the text you would like to hyperlink within the syntax as displayed in the below example.\
{\~\~ “This text will be linked” | hyperlink: URL\_FIELD\_NAME }

{% hint style="info" %}
**Please note:** Hyperlink syntax will only work if the syntax is on its own line within the PowerPoint template. If other syntax is entered on the same line, the hyperlink will not render properly.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pitchly.com/pitchly-slides/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
