# Help with variables please

**URL:** <https://forum.servoy.com/t/help-with-variables-please/5093>\
**Category:** Classic Servoy\
**Created:** [November 22, 2005, 6:25am UTC](https://forum.servoy.com/t/help-with-variables-please/5093 "2005-11-22T06:25:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prj311](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@prj311](https://forum.servoy.com/u/prj311)\
**Post date:** [November 22, 2005, 6:25am UTC](https://forum.servoy.com/t/help-with-variables-please/5093/1 "2005-11-22T06:25:33Z")

</div>

Hi,  
I need to return the value of a global variable into a method, and I am having some trouble.

Below is the code, basically I want to return the value of “formname” into the below method.

So if the formname variable = invoice\_data\_entry below would be

form.invoice\_data\_entry.cust\_name = org\_name;

var formname = globals.statusForm

form.formname.cust\_name = org\_name;

//close popup box  
application.closeFormDialog()

I hope this make sense

PJR

---

<div class="post-metadata">

**Author:** ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)\
**Post date:** [November 22, 2005, 7:18am UTC](https://forum.servoy.com/t/help-with-variables-please/5093/2 "2005-11-22T07:18:21Z")

</div>

try

form[globals.statusForm].cust\_name = org\_name;
