# Changing the value of a component variable

**URL:** <https://community.weweb.io/t/changing-the-value-of-a-component-variable/12736>\
**Category:** How do I?\
**Created:** [September 23, 2024, 8:50pm UTC](https://community.weweb.io/t/changing-the-value-of-a-component-variable/12736 "2024-09-23T20:50:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![enzocarmo](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/enzocarmo/32/7681_2.png) [@enzocarmo](https://community.weweb.io/u/enzocarmo)\
**Post date:** [September 23, 2024, 8:50pm UTC](https://community.weweb.io/t/changing-the-value-of-a-component-variable/12736/1 "2024-09-23T20:50:37Z")

</div>

I have a component with a datagrid, within this component I created an array variable, and put the data from the datagrid as this variable. I’m trying to change this variable outside the component in a workflow page, but I’m unsuccessful

---

<div class="post-metadata">

**Author:** ![enzocarmo](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/enzocarmo/32/7681_2.png) [@enzocarmo](https://community.weweb.io/u/enzocarmo)\
**Post date:** [September 23, 2024, 8:52pm UTC](https://community.weweb.io/t/changing-the-value-of-a-component-variable/12736/2 "2024-09-23T20:52:53Z")

</div>

Even though I put it to expose outside it doesn’t appear in the variable lists

---

<div class="post-metadata">

**Author:** ![jptrinh](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jptrinh/32/1493_2.png) [@jptrinh](https://community.weweb.io/u/jptrinh)\
**Post date:** [September 24, 2024, 8:16am UTC](https://community.weweb.io/t/changing-the-value-of-a-component-variable/12736/3 "2024-09-24T08:16:53Z")

</div>

Hey @enzocarmo  
The Expose outside option is for reading the variable.  
To modify your variable you’d need to create a component workflow that does this, with the appropriate parameters. And expose that component workflow outside. Then, you can execute it from your page workflow with an Execute component workflow 🙂
