AnsweredAssumed Answered

ValueListItems()  The_Related_Valuelist

Question asked by hschlossberg on Sep 28, 2009
Latest reply on Sep 28, 2009 by hschlossberg


ValueListItems()  The_Related_Valuelist

Description of the issue

I have three tables for this much-simplified example: Class, Enrollees, Students Class has one field: ClassIDEnrollees has three fields: ClassID, FirstName, LastName Students has two fields: FirstName, LastName  There are two relationships between four table occurences:1) From Class to Enrollees1, via ClassID in both tables 2) From Enrollees2 to Students, via LastName  I have two value lists:1) VL_Last_Names, which includes ALL Students::LastName2) VL_First_Names_by_LastName, which includes Students::FirstName, RELATED from Enrollees2 My layout is based on Class, with a portal to Enrollees1.   In the portal, the Enrollees1::LastName field has a drop down using VL_Last_Names.  Also in the portal, is Enrollees1::FirstName, which has a drop down using VL_First_Names_by_LastName.  The goal is that the user selects a last name and is then given a choice of only the valid first names for that last name. It may or may not surprise you (because of splitting the two relationships between two separate table occurrence groups) that all of this works so far. However: I now need to set conditional values on the FirstName field so that if the selected value is not in the valuelist, then it will display a different color.  I do this based on the ValueListItems() function and it does not work.  I test it using the data viewer, with my cursor in the portal row, using this calc:  ValueListItems(get(filename); "VL_First_Names_by_LastName").  Shouldn't this calc give me the same results as the actual drop-down gives me?