# Flow card for calculations -\> where to put the result?

**URL:** <https://community.homey.app/t/flow-card-for-calculations-where-to-put-the-result/32334>\
**Category:** Developers\
**Created:** [July 13, 2020, 7:26am UTC](https://community.homey.app/t/flow-card-for-calculations-where-to-put-the-result/32334 "2020-07-13T07:26:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MadMonkey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/madmonkey/32/22606_2.png) [@MadMonkey](https://community.homey.app/u/MadMonkey)\
**Post date:** [July 13, 2020, 7:26am UTC](https://community.homey.app/t/flow-card-for-calculations-where-to-put-the-result/32334/1 "2020-07-13T07:26:48Z")

</div>

I plan to create a action card that performs a complex calculation. Where do I put the result? The only thing I see currently is to trigger a new flow…is there any better option i.e set a tag that can be used by following action cards?

---

<div class="post-metadata">

**Author:** ![DidierVU](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/didiervu/32/12458_2.png) [@DidierVU](https://community.homey.app/u/DidierVU)\
**Post date:** [July 13, 2020, 10:21am UTC](https://community.homey.app/t/flow-card-for-calculations-where-to-put-the-result/32334/2 "2020-07-13T10:21:38Z")

</div>

You can use variables to do this. In the app go to “more” and choose “logic”

---

<div class="post-metadata">

**Author:** ![MadMonkey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/madmonkey/32/22606_2.png) [@MadMonkey](https://community.homey.app/u/MadMonkey)\
**Post date:** [July 14, 2020, 12:34pm UTC](https://community.homey.app/t/flow-card-for-calculations-where-to-put-the-result/32334/3 "2020-07-14T12:34:50Z")

</div>

This is not what I was looking for. What I want is that my app can provide an flow action card that accepts an input value from a token and then performs some calculations. Unfortunately it seems I cannot have a new token that would hold the output.

I could write into a variable, but that would require the use to create one first:/

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [July 14, 2020, 1:04pm UTC](https://community.homey.app/t/flow-card-for-calculations-where-to-put-the-result/32334/4 "2020-07-14T13:04:48Z")

</div>

I’m not sure if I understand your requirement correctly, but have you ever looked at the App [Flow Event Bus](https://homey.app/de-de/app/name.klep.flow-event-bus/Flow-Event-Bus/)?

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [July 14, 2020, 2:09pm UTC](https://community.homey.app/t/flow-card-for-calculations-where-to-put-the-result/32334/5 "2020-07-14T14:09:37Z")

</div>

> [@MadMonkey](#):
>
> would require the use to create one first:/

If you do the calculation in HomeyScript, you can also create a new tag there where you can put your result in:

> const DAYS = [‘zondag’, ‘maandag’, ‘dinsdag’, ‘woensdag’, ‘donderdag’, ‘vrijdag’, ‘zaterdag’];  
> var WeekDay = DAYS[new Date().getDay()];  
> await **setTagValue** (“WeekDay”, {type: “string”, title: “WeekDay”}, DAYS[new Date().getDay()]);

---

<div class="post-metadata">

**Author:** ![MadMonkey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/madmonkey/32/22606_2.png) [@MadMonkey](https://community.homey.app/u/MadMonkey)\
**Post date:** [July 14, 2020, 3:48pm UTC](https://community.homey.app/t/flow-card-for-calculations-where-to-put-the-result/32334/6 "2020-07-14T15:48:50Z")

</div>

Actually I do not need other apps such as flow bus or homeyscript, I am developing my own app;)

So what I am basically looking for is to create a new tag in an action card or something similar, but as this seems not possible I only see the following solution:

1. my app offers an action card that does the calculation

2. my app offers an trigger card which gets triggered when the action card has completed the calculation and the result is passed as token into the trigger card

That works fine, but it is a bit a workaround as the user needs to create a separate flow
