# Shouldn't happen that the trigger element names are empty?!

**URL:** <https://forum.servoy.com/t/shouldnt-happen-that-the-trigger-element-names-are-empty/7266>\
**Category:** Classic Servoy\
**Created:** [March 28, 2007, 3:24pm UTC](https://forum.servoy.com/t/shouldnt-happen-that-the-trigger-element-names-are-empty/7266 "2007-03-28T15:24:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [March 28, 2007, 3:24pm UTC](https://forum.servoy.com/t/shouldnt-happen-that-the-trigger-element-names-are-empty/7266/1 "2007-03-28T15:24:30Z")

</div>

I guess it shouldn’t, but it does. ![:cry:]( "Crying or Very sad")

I have a global method attached to a field in a form. The global method calls a method in the form by using something like

```auto
forms[aFormName][methodName](arguments)

```

That method is called correctly, receiving arguments. From there another global method is called, that starts with this code

```auto
var vForm = arguments[0];

if (!vForm) {
     vForm = application.getMethodTriggerFormName();
}

```

If no form name is passed, I get this error.

I have noticed that after a start of developer I always see this problem. After I switched to design mode once, it always seem to work.

Servoy Developer  
Version 3.1.3-build 407  
Java version 1.6.0-b105 (Windows Vista)

---

<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:** [March 30, 2007, 7:26am UTC](https://forum.servoy.com/t/shouldnt-happen-that-the-trigger-element-names-are-empty/7266/2 "2007-03-30T07:26:50Z")

</div>

Patrick,

What is the error message you are receiving?

Does the problem also happen in app server/client or only in developer.

Rob

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [March 30, 2007, 7:33am UTC](https://forum.servoy.com/t/shouldnt-happen-that-the-trigger-element-names-are-empty/7266/3 "2007-03-30T07:33:17Z")

</div>

Well, at this point

```auto
forms[aFormName]

```

I am getting an error because aFormName is null. In the console I see the message posted. I only do what I described.

I haven’t tested this in client. I can only say it never occurred with Servoy 2.

---

<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:** [March 30, 2007, 9:07am UTC](https://forum.servoy.com/t/shouldnt-happen-that-the-trigger-element-names-are-empty/7266/4 "2007-03-30T09:07:20Z")

</div>

I get the same error messages in Servoy client 3.x.

---

<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:** [March 30, 2007, 10:09am UTC](https://forum.servoy.com/t/shouldnt-happen-that-the-trigger-element-names-are-empty/7266/5 "2007-03-30T10:09:30Z")

</div>

Patrick,

Can you create a small sample solution and add a case in our support system?

Rob

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [March 30, 2007, 10:37am UTC](https://forum.servoy.com/t/shouldnt-happen-that-the-trigger-element-names-are-empty/7266/6 "2007-03-30T10:37:55Z")

</div>

I hope I can create something that will give this error. Will try…

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [March 30, 2007, 10:58am UTC](https://forum.servoy.com/t/shouldnt-happen-that-the-trigger-element-names-are-empty/7266/7 "2007-03-30T10:58:32Z")

</div>

Hi Rob, I think my problem comes from the fact the the original method is called by the popupMenuPlugin. The order goes like this

global method shows popup  
popup event calls form method  
form method calls global method

and that last call doesn’t pass the form name. It does not happen in Servoy 2 and does not happen if you switch to design mode once. I will try to rebuild that setup…

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [March 30, 2007, 11:41am UTC](https://forum.servoy.com/t/shouldnt-happen-that-the-trigger-element-names-are-empty/7266/8 "2007-03-30T11:41:48Z")

</div>

Interesting detail: when I tried to reproduce the problem for a test solution I checked it out in my solution. There, a form name called “liste” should have been passed and didn’t. I created a new solution and while I played with the methods application.getMethodTriggeredFormName returned “liste” at some point although my sample only has one form called “addresses”.

Anyway, I think I have managed to recreate the setup. I don’t manage to get it to work, however, by changing to developer mode here. It simply always fails.

I create a case.
