# Does flow 'calculate' feature support formulas?

**URL:** <https://community.homey.app/t/does-flow-calculate-feature-support-formulas/80448>\
**Category:** Questions & Help\
**Tags:** homey-pro, homey-bridge\
**Created:** [May 13, 2023, 8:04am UTC](https://community.homey.app/t/does-flow-calculate-feature-support-formulas/80448 "2023-05-13T08:04:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre\_Van\_de\_Briel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pierre_van_de_briel/32/48231_2.png) [@Pierre\_Van\_de\_Briel](https://community.homey.app/u/Pierre_Van_de_Briel)\
**Post date:** [May 13, 2023, 8:04am UTC](https://community.homey.app/t/does-flow-calculate-feature-support-formulas/80448/1 "2023-05-13T08:04:43Z")

</div>

Hello, my Homey Pro will be delivered soon (I hope 🙂 but for now i’m using my Bridge. Ik was wondering if the ‘calculate’ feature in flows has functions (e.g. trim(), len(), substr(), sqrt(), … and if yes, where I can find a description. Is there an online manual?  
On a related note, is there a way to copy Bridge flows to the Pro, or do I have to recreate them when I’ll migrate?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [May 13, 2023, 10:32pm UTC](https://community.homey.app/t/does-flow-calculate-feature-support-formulas/80448/2 "2023-05-13T22:32:55Z")

</div>

Most of these functions work

> **[math.js | an extensive math library for JavaScript and Node.js](https://mathjs.org/)**
>
> Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.

Examples  
[https://community.homey.app/search?context=topic&context\_id=80448&q=Math&skip\_context=true](https://community.homey.app/search?context=topic&context_id=80448&q=Math&skip_context=true)

> [@Pierre\_Van\_de\_Briel](#):
>
> is there a way to copy Bridge flows to the Pro, or do I have to recreate them when I’ll migrate

No, unfortunately there’s nothing you can migrate 🤗

---

<div class="post-metadata">

**Author:** ![Pierre\_Van\_de\_Briel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pierre_van_de_briel/32/48231_2.png) [@Pierre\_Van\_de\_Briel](https://community.homey.app/u/Pierre_Van_de_Briel)\
**Post date:** [May 15, 2023, 10:38am UTC](https://community.homey.app/t/does-flow-calculate-feature-support-formulas/80448/3 "2023-05-15T10:38:40Z")

</div>

Thank you Peter! Meanwhile I’d found your same reply elsewhere in the Community Forum 🙂 With examples trim(), len(), substr() I meant (also) string operations, but there doesn’t seem to be a way to run a string operation on Text variables, which is a pity.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [May 15, 2023, 12:34pm UTC](https://community.homey.app/t/does-flow-calculate-feature-support-formulas/80448/4 "2023-05-15T12:34:40Z")

</div>

YW! Yeah I tried to ignore the string part 🤣  
Basic string operations are possible, but use it like this:

 ![Screenshot_20230515-143255_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/b/5bdb6a1fa42f1df7ee1151adefce5c4e55a29d9d.jpeg)

But you might take a look at the [Better Logic Library app](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876), it has also Lodash available.  
You can write your own functions as well with it

 ![Screenshot_20230515-143812_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/a/1a2a6974b4b72c84cde5c9e21e4db6eebb3ed30e.jpeg)

---

<div class="post-metadata">

**Author:** ![Pierre\_Van\_de\_Briel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pierre_van_de_briel/32/48231_2.png) [@Pierre\_Van\_de\_Briel](https://community.homey.app/u/Pierre_Van_de_Briel)\
**Post date:** [May 15, 2023, 3:02pm UTC](https://community.homey.app/t/does-flow-calculate-feature-support-formulas/80448/5 "2023-05-15T15:02:01Z")

</div>

Ah, but I expect my Pro in a few weeks and for now am only a poor ‘Bridge’ user 😉 Unfortunately I cannot load the BLL app in the cloud, and also… I don’t see a ‘Calculate’ option for Text variables in the cloud version (only for numericals).  
Ik moet nog een paar weken geduld hebben 🙂

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [May 15, 2023, 3:07pm UTC](https://community.homey.app/t/does-flow-calculate-feature-support-formulas/80448/6 "2023-05-15T15:07:54Z")

</div>

Ah sorry, BBL is only for the Pro’s

There is only one logics ‘calculate’ card, which I used. Nothing fancy! Go try 😉

 ![Screenshot_20230515-170723_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/e/ce1fdbb5a200f302fcdaf9d0bdf5127bbef7fff2.jpeg)
