# Perfoming repetead calculations

**URL:** <https://forum.bubble.io/t/perfoming-repetead-calculations/15163>\
**Category:** Need help\
**Created:** [July 4, 2017, 3:32am UTC](https://forum.bubble.io/t/perfoming-repetead-calculations/15163 "2017-07-04T03:32:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![felipe](https://avatars.discourse-cdn.com/v4/letter/f/90db22/32.png) [@felipe](https://forum.bubble.io/u/felipe)\
**Post date:** [July 4, 2017, 3:32am UTC](https://forum.bubble.io/t/perfoming-repetead-calculations/15163/1 "2017-07-04T03:32:19Z")

</div>

Hello all… one of the apps Im building I have to perform calculations a lot of times, and type the whole formula everytime. I was wondering if there is an easier way to do that. For example:

I have to show a number  
This number is the sum of one thing minus the sum of other thin

Is there a way to create a variable that has the calculation formula, and then I can call only this variable?

Thanks

---

<div class="post-metadata">

**Author:** ![ashley.benson.tait](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ashley.benson.tait/32/13292_2.png) [@ashley.benson.tait](https://forum.bubble.io/u/ashley.benson.tait)\
**Post date:** [July 4, 2017, 4:37am UTC](https://forum.bubble.io/t/perfoming-repetead-calculations/15163/2 "2017-07-04T04:37:39Z")

</div>

Hey Felipe! Wassup!

Here ya go bro!  
**[https://goo.gl/Ft5LfQ](https://goo.gl/Ft5LfQ)**

Sure, the calculation exists as an ‘expression’ (bubble lingo).

Make an input on your site and a button (sorry, I don’t know your level of Bubble fluency here).

Then, make a workflow for that button (right click on it.)

you can make a permanent data record by creating a new ‘thing’ (database table to hold your data)  
or you can use a non-persistent solution with Bubble’s ‘states’ (this is data stored in the browser, rather than Bubble’s database and it flushes each time you refresh the browser… unless you connect it to the database).

In the space for writing your expression, just put your constants in there 🙂

If yer still stuck, drop me a line, I’ll whip something up for you. (oops, nevermind, I just did it… see the link above)

peace!

Ashley

---

<div class="post-metadata">

**Author:** ![felipe](https://avatars.discourse-cdn.com/v4/letter/f/90db22/32.png) [@felipe](https://forum.bubble.io/u/felipe)\
**Post date:** [July 4, 2017, 1:47pm UTC](https://forum.bubble.io/t/perfoming-repetead-calculations/15163/3 "2017-07-04T13:47:50Z")

</div>

OMG! That’s the best answer I’ve seen so far in the entire forum! What a dedication!!! hahahaha Thank you so much! How can I copy that little project to my applications so I can study the entire “code” behind it? @ashley.benson.tait

Again, thank you!

---

<div class="post-metadata">

**Author:** ![ashley.benson.tait](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ashley.benson.tait/32/13292_2.png) [@ashley.benson.tait](https://forum.bubble.io/u/ashley.benson.tait)\
**Post date:** [July 6, 2017, 3:03am UTC](https://forum.bubble.io/t/perfoming-repetead-calculations/15163/4 "2017-07-06T03:03:56Z")

</div>

Hey @felipe

I’m glad that helped! Here’s a link to the editor file and a how to below.

> **[Bubble Editor - Felipeduzmath](https://bubble.io/page?name=index&id=felipeduzmath&tab=tabs-1)**
>
> Build stuff without code and launch a startup without a tech-cofounder! Bubble is a visual programing language. Instead of typing code, use a visual editor to build applications.

* * *

SUPER SIMPLE How To #315  
“how to port a functional template from one site to another”

1. check your workflows for database connections.

2. Prep your functional package (all the buttons and inputs that constitute your creation) on a group. This way, they can all be “copied with workflows” as a single unit! Kablamo!

3. IF there are data THINGS created by your template, then duplicate the database tables (types and fields) into your new location.

4. After your database tables (types) are created in your new target app, simply right click on your template (that group with all the relevant elements on it) and select copy with WERKFLOWZ.

5. Paste your creation into your new app (paste with workflows) and you are GRAVY!

In my experience, it seems to be a BEST PRACTICE to organize your functional areas by templated groups so you can propogate your amazeballz creations to all corners of your imagination!

Peace!

Ashley

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [September 12, 2017, 3:32am UTC](https://forum.bubble.io/t/perfoming-repetead-calculations/15163/5 "2017-09-12T03:32:29Z")

</div>

Closed on September 12, 2017, 3:32am UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
