# How to insert Icon/Image via Name Template Replacements when data equals A or B

**URL:** <https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099>\
**Category:** Ask for Help\
**Created:** [February 17, 2025, 2:02am UTC](https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099 "2025-02-17T02:02:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Holy-Mackerel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/holy-mackerel/32/85204_2.png) [@Holy-Mackerel](https://community.glideapps.com/u/Holy-Mackerel)\
**Post date:** [February 17, 2025, 2:02am UTC](https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099/1 "2025-02-17T02:02:48Z")

</div>

Hi,  
I am looking for a way to insert 1 of 2 icons or images into a Collection using Name - Template, Replacements based on a total.

I am currently displaying training topics and related completion for a given quarter (layout image below)

 ![Glide_Insert03](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/4/e4442db29c55c0332fa5138af5d0bcc5e644bf7c.png)

This is being done via Template name and Replacements as shown below in Data view from the Users Table:

 ![Glide_Insert01](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/9/c919fb07f4e86625c82b0f148a4d766ea19772ed.png)

What I want to do is insert an additional Replacement that can utilise the course hours (Structured and Total numbers) and then insert 1 icon/image if the total is below a threshold (less than 1 hour structured and 3 hours total) or Insert a 2nd icon/image if the total is greater than a threshold (greater than 1 structured hour and 3 Hours total)

 ![Glide_Insert02](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/6/f6e0078eed906e60ced0b648bab55e90f4f75a49.png)

Any suggestions or recommendations please ?

---

<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:** [February 17, 2025, 2:20am UTC](https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099/2 "2025-02-17T02:20:02Z")

</div>

Use an if-then-else column that returns the appropriate image based on the thresholds, then use the if-then-else column as a replacement in your template.

---

<div class="post-metadata">

**Author:** ![Holy-Mackerel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/holy-mackerel/32/85204_2.png) [@Holy-Mackerel](https://community.glideapps.com/u/Holy-Mackerel)\
**Post date:** [February 17, 2025, 2:41am UTC](https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099/3 "2025-02-17T02:41:43Z")

</div>

Thanks Darren. Bit of a nooby question… should I be inserting the if-then-else column into the users table or a sub table ? I ask this as there is an if-then-else column set up already but it is within a different data sheet not the overarching Users.  
Unfortunately when I try to modify the Replacements within the Name Template, I can not view/select the Display that is utilising the if-then-else as it is not listed under the Users tree ?

 ![Screenshot 2025-02-17 at 1.37.56 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/5/c585149f461e51a787293ed8d6428e0e47d322f6.png)

Here is a view of the Data sources… the if-then I am referring to is within Training Status Sheet and does not seem to be selectable as part of the name Template that is currently displaying the other information ?

 ![Screenshot 2025-02-17 at 1.38.08 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/d/6d834bf904b6b68f34587b11ea578d0aba2c6db2.png)

---

<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:** [February 17, 2025, 2:53am UTC](https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099/4 "2025-02-17T02:53:20Z")

</div>

You are creating this template column in your Users table, yes?  
Could you bring the if-then-else from the other table either as a Single Value, or via a Lookup?

---

<div class="post-metadata">

**Author:** ![Holy-Mackerel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/holy-mackerel/32/85204_2.png) [@Holy-Mackerel](https://community.glideapps.com/u/Holy-Mackerel)\
**Post date:** [February 17, 2025, 3:03am UTC](https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099/5 "2025-02-17T03:03:42Z")

</div>

Correct, the template column is already established in the Users table.  
Are you saying/suggesting I could create a new Lookup column in the Users table that brings/pulls the if-then-else from the other table (Training Status Table) ?

---

<div class="post-metadata">

**Author:** ![Holy-Mackerel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/holy-mackerel/32/85204_2.png) [@Holy-Mackerel](https://community.glideapps.com/u/Holy-Mackerel)\
**Post date:** [February 17, 2025, 3:15am UTC](https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099/6 "2025-02-17T03:15:43Z")

</div>

Also, are you aware of a way to switch the if-then-else statement (text) to an image or icon ?

 ![Screenshot 2025-02-17 at 2.12.45 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/5/a553bca9841f8f623cbff10e761940c33821361b.png)

Thanks once again for your thoughts and input

---

<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:** [February 17, 2025, 3:44am UTC](https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099/7 "2025-02-17T03:44:39Z")

</div>

> [@Holy-Mackerel](#):
>
> Are you saying/suggesting I could create a new Lookup column in the Users table that brings/pulls the if-then-else from the other table (Training Status Table) ?

Yes.

> [@Holy-Mackerel](#):
>
> Also, are you aware of a way to switch the if-then-else statement (text) to an image or icon ?

Just reference the column that contains the image URL in the “THEN” condition.

---

<div class="post-metadata">

**Author:** ![Holy-Mackerel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/holy-mackerel/32/85204_2.png) [@Holy-Mackerel](https://community.glideapps.com/u/Holy-Mackerel)\
**Post date:** [February 17, 2025, 3:55am UTC](https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099/8 "2025-02-17T03:55:52Z")

</div>

Awesome, thank you so much.  
1 additional question, how do you create a new column in the user table as part of a sub group ?

 ![Screenshot 2025-02-17 at 2.51.20 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/a/5a10fe7533b65e54964affb2a6632b2a2201a3a5.jpeg)  
In the image above, my Users table is divided into ‘sub groups’ ? By sub groups I mean collections or groupings of columns. IE CSV | Current Period | Training Status |  
I would like to create a new column within the Training Status group but unfortunately when I (+) a new column it is outside of the Training Status grouping and I cant work out how to include it within the training status collection ?

---

<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:** [February 17, 2025, 4:20am UTC](https://community.glideapps.com/t/how-to-insert-icon-image-via-name-template-replacements-when-data-equals-a-or-b/80099/9 "2025-02-17T04:20:13Z")

</div>

Easiest way is to duplicate one of those existing sub-group columns, then rename/reconfigure it, leaving the group name intact. That’s what I generally do.

Alternatively, you can “Add column right”, then name it like `Training Status/My new column`
