It can be very easy if you have a meaningful relationship between what is selected in the value list and the two other tables (projects and candidates). If you do then it is as simple as putting two portals on the layout and you are done.
With relationships in place.
One way is to create a global field in your parent table.
Place this field on the layout
Change it to a pop up menu and create a list based on items in your parent table you want to show (First field will be the id field of the record).
Create a script that triggers when you change the pop up menu.
That script : set variable ($your global field), perform find $your global field).. basically go find the field selected in the popup.
To hide the portals first up, you need to clear your global on startup or layout load and change the portals to hide if your global field does not equal id of current record.
Is that a fair method Wim?
Seems to work just fine I will use the same global search field on different layouts, dont know if thats smart or not. Can I just make a script that triggers when those layouts opens, and clean out the global search field?
Globals don't have to be related so setup a globals table for this sort if you like. Can use a global variable and avoid the global field altogether too. pros / cons
Maybe forget the script on layout exit. One script that does the relevant find for the underlying table and thats clears after the find is performed. Have a play.
set variable as discussed
if get ( LayoutName )
else if get ( LayoutName )
set field (or alternate $$ var "") ...Set the variable to null at the end of the find script to save adding layout trigger baggage.