# Creating Default values with a Lookup

**URL:** <https://community.glideapps.com/t/creating-default-values-with-a-lookup/50652>\
**Category:** Ask for Help\
**Created:** [October 1, 2022, 10:50pm UTC](https://community.glideapps.com/t/creating-default-values-with-a-lookup/50652 "2022-10-01T22:50:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marshru](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@marshru](https://community.glideapps.com/u/marshru)\
**Post date:** [October 1, 2022, 10:50pm UTC](https://community.glideapps.com/t/creating-default-values-with-a-lookup/50652/1 "2022-10-01T22:50:43Z")

</div>

Hi there - I have looked through older posts but nothing quite answers my question. The closest answer I could find (from 2019) starts with “Create a column that contains the default picture in every row” which is the part I’m struggling with. See details below:

I’m trying to set a default image in a couple of tables and have a Lookups table - basically one row with a single value for the column “ImageDefault”. I use a Lookup in another table to set the default image for each row in that table. I then have an if-then-else column which I want to use to pick up the user-defined image from another column if it exists, otherwise use the ImageDefault Lookup.

Problem is, I can’t see the ImageDefault in the if-then-else pick list so can’t build the rule. I can see the other image columns there, both of which are also lookups from other tables, but not this new ImageDefault Lookup.

Is this because I have not used the relation/lookup combination to drill into a single record? I only have one record (cell) in the Lookups table column, so haven’t done a Relationship in the other table, just a Lookup. The image the Lookup brings back appears to me like a single record (literal) and not a structure (ie. doesn’t show as a shadowed collection in the column but as a single image). But maybe your system needs a relationship/lookup? If so, can you suggest another approach because there’s no way to key into the Lookups table to set up that relationship/lookup on the other table.

---

<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:** [October 1, 2022, 11:20pm UTC](https://community.glideapps.com/t/creating-default-values-with-a-lookup/50652/2 "2022-10-01T23:20:35Z")

</div>

One way to ‘key‘ into the other table would be to put a template column in both tables that contains the same word/ letter. It could be as simple as the letter ‘x’

Then build a SINGLE relation between those two template columns. Next use a lookup column via that newly created relation.

Finally use this new lookup column in your If-Then-Else statement

> [@marshru](#):
>
> basically one row with a single value for the column “ImageDefault”.

If it’s only one row you could use a single value column (instead of a lookup) from the destination table and target your ‘ImageDefault’ columm

---

<div class="post-metadata">

**Author:** ![marshru](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@marshru](https://community.glideapps.com/u/marshru)\
**Post date:** [October 2, 2022, 1:06am UTC](https://community.glideapps.com/t/creating-default-values-with-a-lookup/50652/3 "2022-10-02T01:06:44Z")

</div>

I was hoping not to have to add a key to each thing, but makes perfect sense. Thank you!

---

<div class="post-metadata">

**Author:** ![marshru](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@marshru](https://community.glideapps.com/u/marshru)\
**Post date:** [October 2, 2022, 1:24am UTC](https://community.glideapps.com/t/creating-default-values-with-a-lookup/50652/4 "2022-10-02T01:24:50Z")

</div>

I found it!

Use “\* single value” instead of Lookup : “computed values / other / \* single value” (does the work of a Lookup but brings back the value (literal) instead of the record).

This way you can find the default without setting up an additional key for the relationship.

---

<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:** [October 2, 2022, 7:00am UTC](https://community.glideapps.com/t/creating-default-values-with-a-lookup/50652/5 "2022-10-02T07:00:45Z")

</div>

Yes, using a Single Value is the best approach for your use case.

The reason your lookup wasn’t working as you expected is because when you target a lookup column directly at a table column it will _always_ return an array, even if the target table only contains a single row.
