# Creating magic text formulas using variables form the database

**URL:** https://forum.adalo.com/t/creating-magic-text-formulas-using-variables-form-the-database/34055
**Category:** Database
**Created:** [November 29, 2022, 5:57am UTC](https://forum.adalo.com/t/creating-magic-text-formulas-using-variables-form-the-database/34055 "2022-11-29T05:57:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Phippsy101](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@Phippsy101](https://forum.adalo.com/u/Phippsy101)
#### Post date: [November 29, 2022, 5:57am UTC](https://forum.adalo.com/t/creating-magic-text-formulas-using-variables-form-the-database/34055/1 "2022-11-29T05:57:50Z")

</div>

I am trying to create a magic text formula which uses variables from the database but having issues. I am trying to calculate total values of a portfolio using the data that is already added to the database previously however, when I am editing the custom formula, I don’t have access to the database inputs. I am able to use magic text to display inputs from the database as normal text however, once I try add those variables into the custom formula they are no longer available

Anyone have any insights as to how to fix this?

---

<div class="post-metadata">

### Author: ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)
#### Post date: [December 1, 2022, 1:19pm UTC](https://forum.adalo.com/t/creating-magic-text-formulas-using-variables-form-the-database/34055/2 "2022-12-01T13:19:18Z")

</div>

Hi @Phippsy101,

To use the properties in a custom formula, they need to be a “number” type.  
Also, could you please provide some example screenshots?

Best regards, Victor.
