# Parameter in a global formula via javascript

**URL:** <https://community.weweb.io/t/parameter-in-a-global-formula-via-javascript/2435>\
**Category:** Ask us anything\
**Created:** [April 24, 2023, 2:12pm UTC](https://community.weweb.io/t/parameter-in-a-global-formula-via-javascript/2435 "2023-04-24T14:12:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauromequelussi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mauromequelussi/32/10223_2.png) [@mauromequelussi](https://community.weweb.io/u/mauromequelussi)\
**Post date:** [April 24, 2023, 2:12pm UTC](https://community.weweb.io/t/parameter-in-a-global-formula-via-javascript/2435/1 "2023-04-24T14:12:36Z")

</div>

How do I get a parameter in a global formula via javascript.  
For variable I got variables.NAME\_OF\_VARIABLE . To get the parameter of a formula, what would be the correct one?

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [April 24, 2023, 4:53pm UTC](https://community.weweb.io/t/parameter-in-a-global-formula-via-javascript/2435/2 "2023-04-24T16:53:48Z")

</div>

in global formulas parameters have the name you set with the editor, and you can also choose them from the panel under the code.  
While editing weweb will complain the parameter is missing, but in preview/live it will work.

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

---

<div class="post-metadata">

**Author:** ![mauromequelussi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mauromequelussi/32/10223_2.png) [@mauromequelussi](https://community.weweb.io/u/mauromequelussi)\
**Post date:** [April 24, 2023, 5:14pm UTC](https://community.weweb.io/t/parameter-in-a-global-formula-via-javascript/2435/3 "2023-04-24T17:14:34Z")

</div>

Excellent, that was it. I was confusing because it said that the parameter did not exist, so I thought it had something similar to the variable I reported above.

Thank you very much.
