Value List Display Confusion

I am courious as to why I can and cant see value list items. Here is my scenario:

I have a table orders and a table employees

In my employess table I have a department field (sales, technical, etc..)
I have a global field on my orders form that is filled with (sales, technical etc) via an onshow event.

I have a global relationship based value list that displays a list of all the employees names for a particular dept and returns their ID.

I have a integer field on my Orders table (Rep_ID), that this value list is attached to.

Everything works fine, when I select a name from the list, it populates the Rep_ID field with the correct employee ID, and displayes the name of the employee.

If I switch to design mode, then back, the employee ID is in the field , but the rep_ID field that has the value list attached, no longer shows the name. If I edit another filed on the form, it shows up.

I was just not sure if this is the expected behavior, or ignorance on my part.

Servoy Developer
Version R2 2.2rc3-build 321
Java version 1.4.2_04-b05 (Windows XP)

thanks,
Erich

Hi Erich,

When you switch from Desiger and back out again, the Globals are cleared. I usually have a “dev” script that I run to reset globals after coming out of Designer.

Hope this helps.

Bob,

If I have my global populate via an onshow event, then that show not be an issue. If i edit a field within the record, i then see the name displayed in the combo box. i guess I am not following the logic (would not be the first time).

Thanks,
Erich

It can get tricky sometimes… for example if your startup script sets some other globals and your logic checks those globals, etc.

The best thing to do is to turn on the debugger and then come out of Designer. You’ll see all the methods that fire…

Hope this helps.

I don’t have any start up scripts in my solution as of yet, just event driven ones, this is a simple onshow script, I placed the global on the form so I can see that it is populated, its there!! The list itself has the correct employees from the corresponding dept defined by the global, I will debug and see whats happening,

Thanks for the help