relations

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?

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 = "

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

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: