# New components versus variables

**URL:** <https://community.weweb.io/t/new-components-versus-variables/5804>\
**Category:** How do I?\
**Created:** [December 7, 2023, 4:01pm UTC](https://community.weweb.io/t/new-components-versus-variables/5804 "2023-12-07T16:01:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![SFortuna77](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@SFortuna77](https://community.weweb.io/u/SFortuna77)\
**Post date:** [December 7, 2023, 4:01pm UTC](https://community.weweb.io/t/new-components-versus-variables/5804/1 "2023-12-07T16:01:11Z")

</div>

In the new mechanics about components. I saw that you have the option to create a variable for the element. When I associate the value of a parameter with this variable. My question is when I use the created component, where do I say the value of this variable? I looked but couldn’t find it.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [December 7, 2023, 4:47pm UTC](https://community.weweb.io/t/new-components-versus-variables/5804/2 "2023-12-07T16:47:12Z")

</div>

You should probably use parameters if you want to be able to bind the data. Variables are internal, to the component.

---

<div class="post-metadata">

**Author:** ![benji241](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@benji241](https://community.weweb.io/u/benji241)\
**Post date:** [December 7, 2023, 8:35pm UTC](https://community.weweb.io/t/new-components-versus-variables/5804/3 "2023-12-07T20:35:03Z")

</div>

I was going to do a separate post on this but I think this is along the same lines.

If I use a component over multiple pages, like a plus icon to add new items, and then add a workflow to that component, does it run on that instance only or on every instance of that component?

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [December 7, 2023, 8:45pm UTC](https://community.weweb.io/t/new-components-versus-variables/5804/4 "2023-12-07T20:45:46Z")

</div>

It should trigger on the instance itself only. Unless you have some logic that does otherwise

---

<div class="post-metadata">

**Author:** ![benji241](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@benji241](https://community.weweb.io/u/benji241)\
**Post date:** [December 7, 2023, 8:59pm UTC](https://community.weweb.io/t/new-components-versus-variables/5804/5 "2023-12-07T20:59:03Z")

</div>

I found it firing multiple instances. At least I think that’s what it was doing as my logs were showing a lot more action than what was supposed to be happening. I guess I’ll do more testing on it to verify.

Kind regards,

Daniel White  
Director  
Whitehaus Building Pty Ltd

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [December 7, 2023, 9:02pm UTC](https://community.weweb.io/t/new-components-versus-variables/5804/6 "2023-12-07T21:02:20Z")

</div>

Yeah, I’d do an overhaul of what you’re firing, the new UI got us all a little off guard, gotta get used to it. So far, I’ve had the experience, that the logic is scoped. Unless your logic is firing something on all pages.

---

<div class="post-metadata">

**Author:** ![benji241](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@benji241](https://community.weweb.io/u/benji241)\
**Post date:** [December 7, 2023, 9:15pm UTC](https://community.weweb.io/t/new-components-versus-variables/5804/7 "2023-12-07T21:15:15Z")

</div>

I am using a global workflow so that could be my issue also. Much testing needed

Kind regards,

Daniel White  
Director  
Whitehaus Building Pty Ltd

---

<div class="post-metadata">

**Author:** ![benji241](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@benji241](https://community.weweb.io/u/benji241)\
**Post date:** [December 8, 2023, 5:44am UTC](https://community.weweb.io/t/new-components-versus-variables/5804/8 "2023-12-08T05:44:08Z")

</div>

I think there is some kind of issue going on. I am clicking on a component that doesn’t have a workflow set on it at all and it is throwing errors like something isn’t set right. But it shouldn’t do anything at all if there is no workflow.

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/e/e9ff0b1b8a4130ad030102fb1480bf64d653a472.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/3/39d347461a2acea5fc3125086ccf609842756005.png)

---

<div class="post-metadata">

**Author:** ![benji241](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@benji241](https://community.weweb.io/u/benji241)\
**Post date:** [December 8, 2023, 5:50am UTC](https://community.weweb.io/t/new-components-versus-variables/5804/9 "2023-12-08T05:50:21Z")

</div>

Ok. I figure it out.  
I had added a workflow inside the component. When you go to edit component and then across to the workflows tab i had added on there as shown below.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/d2e9a69fa512b5180a1e956fc62b254cf2327ec2.png)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [December 8, 2023, 8:08am UTC](https://community.weweb.io/t/new-components-versus-variables/5804/10 "2023-12-08T08:08:09Z")

</div>

That’s exactly what I thought 😅 Glad you found it
