# relations

**URL:** <https://forum.servoy.com/t/relations/438>\
**Category:** Classic Servoy\
**Created:** [October 15, 2003, 8:02am UTC](https://forum.servoy.com/t/relations/438 "2003-10-15T08:02:02Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [October 15, 2003, 8:02am UTC](https://forum.servoy.com/t/relations/438/1 "2003-10-15T08:02:02Z")

</div>

I have the following relationship between two tables:

global.date (GLOBALDATETIME)) = date(DATETIME)  
global.name(GLOBALTEXT) = name(TEXT)

in the globalfield: name, there is a pulldown list, of all the names,  
If I select a name, and a date, than the related “data” of that name and date appears in a portal. So far so good. What I want to achieve is that, if I leave the global-field: name empty that all the related data appears in the global, so the relationship has to change in:

date (GLOBAL DATETIME)) = date(DATETIME)

I know this can be achieved (with a lot of tricks) in Filemaker, but can this be done in Servoy?

---

<div class="post-metadata">

**Author:** ![Ron](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Ron](https://forum.servoy.com/u/Ron)\
**Post date:** [October 15, 2003, 12:20pm UTC](https://forum.servoy.com/t/relations/438/2 "2003-10-15T12:20:50Z")

</div>

Hi HJK,

May be I don’t see the problem..  
If you use a second Global : globals.datetemp (= Pulldownmenu)  
You could put in a method (onFocusLost) :  
globals.date = globals.datetemp  
and than set globals.date = "

---

<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:** [October 15, 2003, 12:37pm UTC](https://forum.servoy.com/t/relations/438/3 "2003-10-15T12:37:18Z")

</div>

You can only use globals, on one side of the relation.  
try it, and you see.

---

<div class="post-metadata">

**Author:** ![Ron](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Ron](https://forum.servoy.com/u/Ron)\
**Post date:** [October 15, 2003, 12:56pm UTC](https://forum.servoy.com/t/relations/438/4 "2003-10-15T12:56:17Z")

</div>

I know HJK (the same like in FMP).  
What I ment is that you keep the relationship like it is.  
Only you use a separate global for your pdm.  
globals.date = globals.datetemp is part of a method not of the  
relationship.  
Now I see that this won’t work because the key is not ‘set’ if you  
select the pdm value, but only if you leave the field/pdm.  
Nasty problem portalmaster! ![:wink:]( "Wink")
