How to dynamically select the data source for your presentation

Connect a Google Drive folder containing multiple data sources and use a variable to select the data for each presentation

In some use cases, we need to dynamically select the data source. Take the example where we have a separate Google Sheet file for each client or sales prospect but we want to use the same slide template for all clients. In that case, the first placeholder we need to fill in is the name of the client. Then we can select the correct Google Sheet and pull in the data.

This scenario is really simple with Slideform! Read on for the play-by-play instructions, or watch the tutorial here:

 

  1. Organize your data sheets.

    Each Google Sheet must have the same layout (i.e. headings and tables must be in the same cell location in each version) and worksheet names so that you can index into the cells. For example, if Sheet 1 cell A5 has the client name in one sheet, it must also contain the client name in the other sheets.

  2. Connect to Slideform.

    Share the Google Drive with share@slideform.co . Add it as a data source by going to Data Sources > Add Data Source. Select Google Drive > Add Integration, and then paste in the URL of your Drive folder (use the URL from the browser, not the share link). Click Save and wait a few minutes for the data to be indexed.
  3. Create a presentation template

    Make a slide deck with placeholders and save it in Slideform. For details, go to How to create a slide deck template

    Your template must include a pragma that will hold the data source name. This pragma will be used to select among the different Google Sheets in the folder. 
    In my example, this pragma {{sheet name}} is displayed on the slide, but if you do not want to display it, just put the pragma in the speaker notes on any slide.
  4. Set the data source name

    The user must set the value of the data source name pragma before output can be generated. Let's take a look at my project's Configure Data screen, for the {{sheet name}} pragma.
    The best way to set a value for this pragma is to set up a dropdown menu for the user to select from. We will pull in the list of files in the folder and allow the user to select the correct one. Here is how it is set up:Screenshot 2024-05-28 at 3.14.59 PM
    1. How should the user enter their answer? -->  Select from Dropdown
    2. Click Preset a Value
    3. Where is the data from? --> select the Google Drive data source
    4. Select how to obtain the metrics --> Use Predefined Metric
    5. Select your worksheet --> leave blank
    6. Select your KPI --> List of Documents
  5. Configure the data mapping for the remaining pragmas. 

Now you need to preset a value for the other data in your presentation. Let's look at the example below.

Screenshot 2024-05-28 at 3.19.31 PM

For {{data:table1}} , we want to pull in Sheet1 cells A1:C4 from whichever Google Sheet file we are using. Remenber that the name of the Google Sheet is stored in the pragma {{sheet name}} .

To set this up, click Preset a Value and select the Google Drive folder as the data source. Then choose Query Data Source and <Lookup in Pragma> for the default sheet/table. Select the correct pragma that holds the data source name.

Then in the query box, enter your query using SQL syntax. You can select a range of cells and use Slim Table to crop it down to only the cells that contain data. Or you can select just a single cell to pull in a text or number value.

6. Generate the output

Click Generate on the project card. The first thing you will do is select the data sheet from the dropdown menu that you created. Then the remaining data will be filled in and the output can be saved.

 

We're here to help!  Contact support@slideform.co if you have any questions.