# Get the actual formName

**URL:** <https://forum.servoy.com/t/get-the-actual-formname/16603>\
**Category:** Classic Servoy\
**Created:** [October 5, 2012, 8:08am UTC](https://forum.servoy.com/t/get-the-actual-formname/16603 "2012-10-05T08:08:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pentamsi](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@pentamsi](https://forum.servoy.com/u/pentamsi)\
**Post date:** [October 5, 2012, 8:08am UTC](https://forum.servoy.com/t/get-the-actual-formname/16603/1 "2012-10-05T08:08:26Z")

</div>

I have a doubt, and for the moment i don’t know how to fixit.

The problem is, how can i get the actual formName. I want to say, if i edit a record, in my own dc\_edit i have some comprobations and other action i do. But with the globals varaibles **nav\_currentPanel1Form** , **nav\_current\_formname** not returning the correct form, and with the 2nd return the last tab loaded, that isn’t the tab i am editing.

I try too the variable **globals.nav.getCurrentFormName()** but they say is not a function valid, and i can’t see in any place.

Any idea? only I want is getting the actual form, independent if it is \_dtl or \_tbl, the actual visualization form.

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [October 5, 2012, 8:27am UTC](https://forum.servoy.com/t/get-the-actual-formname/16603/2 "2012-10-05T08:27:19Z")

</div>

pentamsi,

Do you edit from an event handler, like onaction or ondatachange?  
Try the event parameter that is passed: event.getFormName()

Rob

---

<div class="post-metadata">

**Author:** ![pentamsi](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@pentamsi](https://forum.servoy.com/u/pentamsi)\
**Post date:** [October 5, 2012, 8:44am UTC](https://forum.servoy.com/t/get-the-actual-formname/16603/3 "2012-10-05T08:44:41Z")

</div>

Hi.

In “dc\_edit”, “dc\_new” and something else, we can see that can use the var “globals.nav\_current\_formname” for example but we want to used this var in “dc\_delete” and when we’ll test we can’t see nothing, this var doesn’t are filled on this method and we cant do our work, it’s a bug?

We solved the problem with this method.

```auto
// Get the toolbar name
var toolbar = getToolbarFormName()

// Get the current form name
var currentForm = forms[toolbar].vFormname

// with the currentFrom we can know the parent form with this method
var parentForm = solutionModel.getForm(currentForm).extendsForm.name

```

But anyway we want to know if Servoy will do something respect this. You think will fill this global var or we need use our method?ç

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![sanneke](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@sanneke](https://forum.servoy.com/u/sanneke)\
**Post date:** [October 8, 2012, 12:31pm UTC](https://forum.servoy.com/t/get-the-actual-formname/16603/4 "2012-10-08T12:31:02Z")

</div>

Hi Penta,

If I understand you correctly the global ‘nav\_currentPanel1Form’ is not filled correctly in dc\_delete. But I just tried that and it seems to be good. I used:

```auto
function dc_delete(_event, _noDialog) {
	application.output(globals.nav_currentPanel1Form)
	
//	return _super.dc_delete(_event, _noDialog)
}

```
