# Creating a Template with Relational Data

**URL:** <https://community.glideapps.com/t/creating-a-template-with-relational-data/49137>\
**Category:** Ask for Help\
**Created:** [September 12, 2022, 1:36pm UTC](https://community.glideapps.com/t/creating-a-template-with-relational-data/49137 "2022-09-12T13:36:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gary\_Willmott](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gary_willmott/32/837_2.png) [@Gary\_Willmott](https://community.glideapps.com/u/Gary_Willmott)\
**Post date:** [September 12, 2022, 1:36pm UTC](https://community.glideapps.com/t/creating-a-template-with-relational-data/49137/1 "2022-09-12T13:36:22Z")

</div>

I managed to figure out the power of Row IDs

However I’m trying to create Template Text using the values?

Here is the scenario:  
I’m building a Gallery with a PhotoGrapher and Location

When you publish to Gallery, it populates “Photographer ID” with your Photographer ID  
I then build a relational Column "Ref Photos Ids"that Matched the Value

 ![Screenshot 2022-09-12 at 15.34.48](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/9/89a609c60aad22746e746031f6c56fa753102c69.png)

However when I try to create a Template it won’t allow me to use the Relational column?

 ![Screenshot 2022-09-12 at 15.35.26](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/9/29a0a42beaf12c1bd3d40ec1fb54b45cea4ccc0e.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 12, 2022, 1:53pm UTC](https://community.glideapps.com/t/creating-a-template-with-relational-data/49137/2 "2022-09-12T13:53:52Z")

</div>

A relation creates a link to an entire row, or set of rows. If you need a specific column from that row, then you also need a lookup column that will return a specific column from that relation.

---

<div class="post-metadata">

**Author:** ![Gary\_Willmott](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gary_willmott/32/837_2.png) [@Gary\_Willmott](https://community.glideapps.com/u/Gary_Willmott)\
**Post date:** [September 13, 2022, 4:09am UTC](https://community.glideapps.com/t/creating-a-template-with-relational-data/49137/3 "2022-09-13T04:09:54Z")

</div>

Thanks Jeff, however I don’t see what lookup has todo with creating a template?

I can create a template fine if it’s referencing a string

 ![Screenshot 2022-09-13 at 06.08.01](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/2/e2c72c5d562342702114225b0e148faffb444cc4.png)

However it won’t let me pick a relational column?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 13, 2022, 4:14am UTC](https://community.glideapps.com/t/creating-a-template-with-relational-data/49137/4 "2022-09-13T04:14:05Z")

</div>

> [@Gary\_Willmott](#):
>
> However it won’t let me pick a relational column?

Correct.  
Because as Jeff pointed out, a relation just establishes a link to one or more rows. It doesn’t actually contain any values.  
If you want to subsequently use a value from one of the linked rows, then you need to fetch that value using a lookup column.

_Note: the above advice assumes that your relation is a single relation._

---

<div class="post-metadata">

**Author:** ![Gary\_Willmott](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gary_willmott/32/837_2.png) [@Gary\_Willmott](https://community.glideapps.com/u/Gary_Willmott)\
**Post date:** [September 13, 2022, 3:45pm UTC](https://community.glideapps.com/t/creating-a-template-with-relational-data/49137/5 "2022-09-13T15:45:15Z")

</div>

> [@Darren\_Murphy](#):
>
> e advice assumes

Thanks @Darren_Murphy and @Jeff_Hager I don’t know where I’m going wrong with Lookup?

I just did a test now and it keeps pulling up multiple values?

See below: Photo Name,  
 ![Screenshot 2022-09-13 at 17.43.27](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/f/ef2eccab97925fb861de47f484a73854ac345044.png)

![Screenshot 2022-09-13 at 17.43.34](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/2/d2eb27293d9edebc852da2cba0289cb901ba0054.png)

 ![Screenshot 2022-09-13 at 17.44.31](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/6/a6d030c37ac674124091c9f53971680cfec43f2f.png)

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [September 13, 2022, 3:59pm UTC](https://community.glideapps.com/t/creating-a-template-with-relational-data/49137/6 "2022-09-13T15:59:56Z")

</div>

In the lookup configuration use your ‘testRefPhoto’ for the relation column and then target the Name.

That should do the trick.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 13, 2022, 4:02pm UTC](https://community.glideapps.com/t/creating-a-template-with-relational-data/49137/7 "2022-09-13T16:02:33Z")

</div>

> [@Gary\_Willmott](#):
>
> I just did a test now and it keeps pulling up multiple values?

Looks like your relation is a multiple relation.  
It needs to be a Single Relation  
Check to see if you have the “Match Multiple” box checked…if so, uncheck it.

 ![Screen Shot 2022-09-14 at 12.01.29 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/3/63ed5816e6aa66943e3177fae7eb157a942d9796.png)

---

<div class="post-metadata">

**Author:** ![Gary\_Willmott](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gary_willmott/32/837_2.png) [@Gary\_Willmott](https://community.glideapps.com/u/Gary_Willmott)\
**Post date:** [September 13, 2022, 4:16pm UTC](https://community.glideapps.com/t/creating-a-template-with-relational-data/49137/8 "2022-09-13T16:16:22Z")

</div>

Thanks this did the trick, I wasn’t actually selecting the relation column before 🙈

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [September 14, 2022, 4:16pm UTC](https://community.glideapps.com/t/creating-a-template-with-relational-data/49137/9 "2022-09-14T16:16:40Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
