# Template Question

**URL:** <https://community.glideapps.com/t/template-question/18061>\
**Category:** Ask for Help\
**Created:** [November 6, 2020, 7:34pm UTC](https://community.glideapps.com/t/template-question/18061 "2020-11-06T19:34:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 6, 2020, 7:34pm UTC](https://community.glideapps.com/t/template-question/18061/1 "2020-11-06T19:34:10Z")

</div>

Hi,

I would like to create a template, where it only displays if there is text in the column? How can I set that up?

Thank you!!

 ![dinein](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/6/e6fd9852fa4c905655f7e7d020bbcad1417bb875.png)

![dinein1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/c/8c2e4963e01afcae747028193489d4560f93f0d6.jpeg)

---

<div class="post-metadata">

**Author:** ![eltintero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eltintero/32/76520_2.png) [@eltintero](https://community.glideapps.com/u/eltintero)\
**Post date:** [November 6, 2020, 7:42pm UTC](https://community.glideapps.com/t/template-question/18061/2 "2020-11-06T19:42:31Z")

</div>

Create first an IF THEN column. If To-Go is NOT EMPTY, then To-Go, else empty. Then use that If Then in your template column.

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 6, 2020, 7:49pm UTC](https://community.glideapps.com/t/template-question/18061/3 "2020-11-06T19:49:46Z")

</div>

Like this?

 ![dinein3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/c/1c75156880f82640a425ae847c123240a08717bb.png)

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 6, 2020, 7:54pm UTC](https://community.glideapps.com/t/template-question/18061/4 "2020-11-06T19:54:50Z")

</div>

Ahh! Think I got it! Thank you!  
How do I get rid of the ‘&’ if both do not apply?

 ![dinein4](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/0/e09dd05b67ac9e9ad065d02fff1ea95d39105512.png)

---

<div class="post-metadata">

**Author:** ![eltintero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eltintero/32/76520_2.png) [@eltintero](https://community.glideapps.com/u/eltintero)\
**Post date:** [November 6, 2020, 8:49pm UTC](https://community.glideapps.com/t/template-question/18061/5 "2020-11-06T20:49:45Z")

</div>

Set it up as well in an IF THEN.  
IF To-Go is not empty, and IF Dine-In is not empty, then &. And you use it in your template column

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 7, 2020, 5:16am UTC](https://community.glideapps.com/t/template-question/18061/6 "2020-11-07T05:16:46Z")

</div>

Not sure I get you.

---

<div class="post-metadata">

**Author:** ![eltintero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eltintero/32/76520_2.png) [@eltintero](https://community.glideapps.com/u/eltintero)\
**Post date:** [November 7, 2020, 4:52pm UTC](https://community.glideapps.com/t/template-question/18061/7 "2020-11-07T16:52:37Z")

</div>

Create a new IF THEN column. We’re looking for 2 IF conditions,

1. If To-Go is not empty,
2. If Dine-In is not empty,

Then, &

Else, empty.

Then, in your current template column, instead of the &, you just replace that value with the new if then column we created above. That way, you bring the & to the template column only when the restaurant has dine in and to do.

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 7, 2020, 5:52pm UTC](https://community.glideapps.com/t/template-question/18061/8 "2020-11-07T17:52:40Z")

</div>

Ok! This?

 ![if2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/b/0ba236d10bb9bcdb76ccb500b39165b6a4fc6bdf.png)

 ![if1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/2/124e133d02a728b3592816a43b09d72f2edcbba3.png)

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 8, 2020, 1:20am UTC](https://community.glideapps.com/t/template-question/18061/9 "2020-11-08T01:20:19Z")

</div>

The & symbol is still showing up.

![if3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/2/0255e89160385702e70a437e6e730f8da3fc4eb5.jpeg)

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 9, 2020, 4:33am UTC](https://community.glideapps.com/t/template-question/18061/10 "2020-11-09T04:33:16Z")

</div>

Does anyone have a solution to get rid of the & symbol?

---

<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:** [November 9, 2020, 4:48am UTC](https://community.glideapps.com/t/template-question/18061/11 "2020-11-09T04:48:49Z")

</div>

Here is one way to do it:

Define 2 template columns, here I’ve called them “Template Single” and “Template Both”

 ![Screen Shot 2020-11-09 at 12.41.58 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/2/c23970d3a485dd7bc6c85b229e4c1a12f58e04b0.png)

The configuration for Template Single:

 ![Screen Shot 2020-11-09 at 12.42.14 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/a/8adfc0d818242cca904e8925e260ee018800f88f.png)

The configuration for Template Both:

 ![Screen Shot 2020-11-09 at 12.42.33 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/7/5775093b1c4eeb853b5546f6b18a9dda3ba197cc.png)

Then in your layout, add components for _both_ templates, but use visibility conditions to control which one appears.

For single:

![Screen Shot 2020-11-09 at 12.47.00 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/0/009e6637c711856739468b6def53e600f9d9e6e4.png)

And for both:

![Screen Shot 2020-11-09 at 12.47.15 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/6/76e11a7bf7789b19731779add5a3a0dde1e76e35.png)

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 9, 2020, 4:59am UTC](https://community.glideapps.com/t/template-question/18061/12 "2020-11-09T04:59:46Z")

</div>

Oh I love this!! Thing is, this is for an image TAG, so I can only use one template. ☹

---

<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:** [November 9, 2020, 5:01am UTC](https://community.glideapps.com/t/template-question/18061/13 "2020-11-09T05:01:15Z")

</div>

You should still be able to use it.  
Add the image twice, and use the same visibility conditions to control which appears.

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 9, 2020, 5:15am UTC](https://community.glideapps.com/t/template-question/18061/14 "2020-11-09T05:15:24Z")

</div>

This portion is more than an image, its a card layout, with header, title and details.

---

<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:** [November 9, 2020, 5:19am UTC](https://community.glideapps.com/t/template-question/18061/15 "2020-11-09T05:19:24Z")

</div>

Okay, but the same still applies.  
You can add the component twice.  
In one instance of the component you use Template Single as the image tag, and in the second instance you use Template Both. And then again, you use the visibility conditions to control which appears.  
That should work, no?

(PS. There is probably a better way to do this, and I am by no means an expert. This is just the first way that occurred to me)

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 9, 2020, 5:27am UTC](https://community.glideapps.com/t/template-question/18061/16 "2020-11-09T05:27:57Z")

</div>

Thank you!

I don’t think it will work, since this is under the ‘see more’ text. So it’s all under one component.

---

<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:** [November 9, 2020, 5:32am UTC](https://community.glideapps.com/t/template-question/18061/17 "2020-11-09T05:32:23Z")

</div>

Okay.  
Are you able to share your app and allow me to copy it?  
If I can see all this in context then maybe I can help you find a solution.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 9, 2020, 9:01am UTC](https://community.glideapps.com/t/template-question/18061/18 "2020-11-09T09:01:23Z")

</div>

Let’s not make this too complicated. I think we can do it like this.

**Dine-in ITE** : If Dine-in is not empty then 1, else 0.

**To-Go ITE** : If To-go is not empty then 2, else 0.

**Condition Sum** : Dine-in ITE + To-Go ITE

**Final Display** : If Condition Sum (CS) = 3 then Dine-in & To-Go, if CS = 2 then To-Go, if CS = 1 then Dine-in, else empty.

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [November 9, 2020, 1:30pm UTC](https://community.glideapps.com/t/template-question/18061/19 "2020-11-09T13:30:12Z")

</div>

Thank you Thinh! Where do I find condition sum?

And Final Display?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 9, 2020, 2:09pm UTC](https://community.glideapps.com/t/template-question/18061/20 "2020-11-09T14:09:31Z")

</div>

You create those in your data, condition sum is a math column, final display is If Then Else.

[Next page](https://community.glideapps.com/t/template-question/18061.md?page=2)
