# 3.5: Define global relation issue

**URL:** <https://forum.servoy.com/t/3-5-define-global-relation-issue/7956>\
**Category:** Classic Servoy\
**Created:** [August 2, 2007, 2:21pm UTC](https://forum.servoy.com/t/3-5-define-global-relation-issue/7956 "2007-08-02T14:21:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karel\_Broer](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@Karel\_Broer](https://forum.servoy.com/u/Karel_Broer)\
**Post date:** [August 2, 2007, 2:21pm UTC](https://forum.servoy.com/t/3-5-define-global-relation-issue/7956/1 "2007-08-02T14:21:35Z")

</div>

If I set a global variable and -try- to get related data from that right after setting the global, the relationship doesn’t seem to exist…

To ‘activate’ the global relationship, I need to put a databasemanager.saveData() right after setting the global…

Servoy Developer  
Version 3.5-build 513  
Java version 1.5.0\_07-87 (Mac OS X)

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [August 2, 2007, 4:55pm UTC](https://forum.servoy.com/t/3-5-define-global-relation-issue/7956/2 "2007-08-02T16:55:07Z")

</div>

I have seen this behaviour also in prior versions of Servoy. That’s why I always do saveData()

---

<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 3, 2007, 11:57am UTC](https://forum.servoy.com/t/3-5-define-global-relation-issue/7956/3 "2007-08-03T11:57:00Z")

</div>

so you are saying this doesn’t work in scripting:

```auto
globals.relationkey = 10;
if (my_global_to_table_relation.getSize() > 0)
{
}

```

that should work just fine. If you have a test case please add to our support system.[/code]
