4 Replies Latest reply on Feb 6, 2014 10:24 AM by EP

    Cond value List issue

    EP

      Title

      Cond value List issue

      Post


           I had a relationship in place:

           Table1::Discipline = Table2::Discipline

           Users pick the "discipline" (Table2::Discipline) from a popup menu that shows these 2 values: Doctor, Nurse.  I created a popup menu on a layout for Table2::Employee.  A Conditional Value list has been set up to display only values from the second field based on the above relationship.  So when a user selects "Doctor" for the Table2::Discipline field, they see a bunch of employees that are "Doctors" and Nurses do not appear.  I recently realized that I need another condition in place: "Status."  I only want "Active" employees to show up in the popup.

           I went ahead and added to the initial relationship: Table1::Status = Table2::Status.  I created an auto-enter value for Table2::Status ("Active").  It works, but now employees that are terminated end up being removed from Table2::Employee field and Table1::_pkPersonnelID only displays (Field 1 of the value list).

           Any way to fix this?

        • 1. Re: Cond value List issue
          philmodjunk

               Are you using a drop down list or pop up menu?

               With a drop down list, you can place a name field from the related table on top of the drop down list but with Behavior settings specified that denies Browse Mode access. You click on the visible name field and the drop down list hidden behind it pops to the front and deploys.

               If you use that method, the Name field can be referenced via a relationship to a different Occurrence of the same table and then that relationship need not include the specified status as part of its relationship.

          • 2. Re: Cond value List issue
            EP

                 I am using a popup menu.  I assume there is no solution using a popup menu?

            • 3. Re: Cond value List issue
              philmodjunk

                   There's no way to get the pop up menu to show a name that is no longer part of the value list. There might be ways to hide the pop up behind an invisible tab panel such that one tab panel shows the same related name field that I described while the other shows the pop up menu. An OnRecordLoad script trigger could check the status of the selected employee and if they are no longer active, use Go to Object to pop the panel with the name field up to conceal the now nonfunctional pop up menu...

              • 4. Re: Cond value List issue
                EP

                     Worked like a charm, I had no idea you could drop a field on top of another that uses a popup menu and make it work like you described.  I simply put a Table2::NameField (denied field entry in browse mode) on top of the popup menu field (Table2::Employee).  So now it always displays a name and hides the field containing Table1::_pkPersonnelID.  I think the trick here is that I have a OnOnjectSave script trigger that sets the _fkPersonnelID in table 2 (which the layout is based off of with data from Table1::_pkPersonnelID.  I didn't have to change my popup menu for a dropdown either. Works on Win so far, hope I get the same behavior on a Mac.

                     Thanks!