# Global "enum" in a valuelist

**URL:** <https://forum.servoy.com/t/global-enum-in-a-valuelist/16094>\
**Category:** Classic Servoy\
**Created:** [June 22, 2012, 1:33pm UTC](https://forum.servoy.com/t/global-enum-in-a-valuelist/16094 "2012-06-22T13:33:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![maria](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@maria](https://forum.servoy.com/u/maria)\
**Post date:** [June 22, 2012, 1:33pm UTC](https://forum.servoy.com/t/global-enum-in-a-valuelist/16094/1 "2012-06-22T13:33:15Z")

</div>

Hi All!

Just wondering if it’s a bug or expected Servoy behaviour.  
I have a valuelist referring to a global variable that is an object: var badFlips = { flip:“badFlip”, flop:“badFlop”};  
The valuelist has the following contents:

```auto
flip|%%globals.flip.flip%%
flop|%%globals.flip.flop%%

```

Well, they don’t work ![:)]( "Smile").  
I understand I can refer to global variable of basic types and this one is a little different.  
But in the functions and methods a reference like globals.flip.flop would work so I assumed it would too in a valuelist ![:D]( "Very Happy")

Cheers,  
Maria

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [June 24, 2012, 9:56am UTC](https://forum.servoy.com/t/global-enum-in-a-valuelist/16094/2 "2012-06-24T09:56:21Z")

</div>

Hi Maria,

I would not expect this to work, don’t you mean:

```auto
flip|%%globals.badFlips.flip%%
flop|%%globals.badFlips.flop%%

```

However, I tested that and it doesn’t work either… whereas it works fine when global variables of basic type are used. So it looks like the enum is indeed the problem.

Greetings,  
Omar

---

<div class="post-metadata">

**Author:** ![maria](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@maria](https://forum.servoy.com/u/maria)\
**Post date:** [June 24, 2012, 11:29pm UTC](https://forum.servoy.com/t/global-enum-in-a-valuelist/16094/3 "2012-06-24T23:29:22Z")

</div>

> omar:  
> Hi Maria,
> 
> I would not expect this to work, don’t you mean:
> 
> ```auto
> flip|%%globals.badFlips.flip%%
> 
> ```

flop|%%globals.badFlips.flop%%

> ```auto
> 
> However, I tested that and it doesn't work either... whereas it works fine when global variables of basic type are used. So it looks like the enum is indeed the problem. 
> 
> Greetings,
> Omar
> 
> ```

Yes, Omar, I renamed the variables in a sample solution where I tested them, but yes, above is what I expected to work.  
Ah well, will have to convert them all back to normal global variables I reckon.

Cheers,  
Maria

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [June 25, 2012, 7:22am UTC](https://forum.servoy.com/t/global-enum-in-a-valuelist/16094/4 "2012-06-25T07:22:14Z")

</div>

Maybe you should file a case?

---

<div class="post-metadata">

**Author:** ![maria](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@maria](https://forum.servoy.com/u/maria)\
**Post date:** [June 27, 2012, 1:05am UTC](https://forum.servoy.com/t/global-enum-in-a-valuelist/16094/5 "2012-06-27T01:05:04Z")

</div>

> omar:  
> Maybe you should file a case?

Well, before I do it’d be nice to hear from Servoyans ![:)]( "Smile")

Cheers,  
Maria

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [June 27, 2012, 8:58am UTC](https://forum.servoy.com/t/global-enum-in-a-valuelist/16094/6 "2012-06-27T08:58:51Z")

</div>

+1 for me

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [August 21, 2012, 8:40am UTC](https://forum.servoy.com/t/global-enum-in-a-valuelist/16094/7 "2012-08-21T08:40:37Z")

</div>

this is not a bug, more a feature request to get this working

Servoy never really evaluated the actual javascript object of a global to get the value. It has only support for looking up global variables themselves.
