# Calculated fields

**URL:** <https://community.glideapps.com/t/calculated-fields/12861>\
**Category:** Ask for Help\
**Created:** [July 21, 2020, 1:50am UTC](https://community.glideapps.com/t/calculated-fields/12861 "2020-07-21T01:50:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alfredo\_Pou](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alfredo_pou/32/10797_2.png) [@Alfredo\_Pou](https://community.glideapps.com/u/Alfredo_Pou)\
**Post date:** [July 21, 2020, 1:50am UTC](https://community.glideapps.com/t/calculated-fields/12861/1 "2020-07-21T01:50:17Z")

</div>

How do I use calculated fields?  
For example, 1. Count the number of products delivered (avoid buying a product that exceeded a quantity).  
2. Concatenate 2 or more text fields into a single field.  
3. Dependent dropdowns: How to make a dropdown depend on the selection in the previous one?  
4. That a field is visible but disabled by a given condition.  
Is there any documentation on these topics? I didn’t find anything.  
Thank you!

---

<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:** [July 21, 2020, 1:58am UTC](https://community.glideapps.com/t/calculated-fields/12861/2 "2020-07-21T01:58:36Z")

</div>

> [@Alfredo\_Pou](#):
>
> Count the number of products delivered (avoid buying a product that exceeded a quantity).

Let’s say you have a “Products” sheet and a “Sales” sheet, use a relation matching the product ID/name from the “Products” sheet to “Sales” sheet, then a rollup to count the number of delivered products.

If you have a further ‘delivered’ status TRUE or FALSE, you can make a template column joining the ID to a TRUE (i.e SKU0001 TRUE) in the ‘Products’ sheet, then match it with a template joining the ID and the Delivered status in the ‘Sales’ sheet, repeat the steps above for the relation and rollup.

Then set the visibility for buy button based on the rollup or further calculations based on your logic.

---

<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:** [July 21, 2020, 1:59am UTC](https://community.glideapps.com/t/calculated-fields/12861/3 "2020-07-21T01:59:39Z")

</div>

> [@Alfredo\_Pou](#):
>
> Concatenate 2 or more text fields into a single field.

You can use the the template column for that, just type anything that makes sense to you to serve as an abbreviation of the original text columns (to make it easier to debug when something goes wrong), then replace them with the right columns to make the concatenate work.

---

<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:** [July 21, 2020, 2:00am UTC](https://community.glideapps.com/t/calculated-fields/12861/4 "2020-07-21T02:00:37Z")

</div>

> [@Alfredo\_Pou](#):
>
> Dependent dropdowns: How to make a dropdown depend on the selection in the previous one?

You can follow this video by Robert.

> [@new Screen Visibility and Filtering Conditions!](https://community.glideapps.com/t/screen-visibility-and-filtering-conditions/12306/4):
>
> Here’s a demo: Available in my experiments app: [https://experiments.glideapp.io](https://experiments.glideapp.io)

> [@Alfredo\_Pou](#):
>
> That a field is visible but disabled by a given condition.

Set up your field, let’s say a text component, and a user-specific boolean column, let’s say “VisibleText”.

Set the text component to be visible when VisibleText is not True, then in the screen, add a switch/checkbox that lets the user switch/tick and point that value to the “VisibleText” column.

When the user has switched/ticked that component, the text will not be visible anymore.

---

<div class="post-metadata">

**Author:** ![Alfredo\_Pou](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alfredo_pou/32/10797_2.png) [@Alfredo\_Pou](https://community.glideapps.com/u/Alfredo_Pou)\
**Post date:** [July 21, 2020, 4:11pm UTC](https://community.glideapps.com/t/calculated-fields/12861/5 "2020-07-21T16:11:41Z")

</div>

Thanks @ThinhDinh  
I understand, but how do I implement it? From the spreadsheet adding columns and putting formulas, or from the platform? Is there something like virtual columns? I come from 4 years of using “AppSheet”, and I have that logic very incorporated. This doesn’t seem similar, does it?

---

<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:** [July 21, 2020, 4:13pm UTC](https://community.glideapps.com/t/calculated-fields/12861/6 "2020-07-21T16:13:11Z")

</div>

I don’t have experience with AppSheet, but the columns above can be added in the Data Editor of Glide.
