3 Replies Latest reply on Jan 21, 2009 8:47 AM by Orlando

    Value list based on field contents subject to another value

    andyg4137

      Title

      Value list based on field contents subject to another value

      Post

      i have created a value list listing all members of staff which is picked from the field in the employee database, each record also has a status which lists them as active or left. is there a way to create the value list based on the field contents (employee name) but only shows active employees in the drop down list in other databases?

       

      thanks

       

      Andy

        • 1. Re: Value list based on field contents subject to another value
          Orlando
            

          Hi Andy

           

          What you want to do is create a calculated field that only displays the name if the Status field is marked "Active", and then point your value list to that fioeld instead of the Employee Name field.

           

          So create a new field and make is a Calculation:

           

          ActiveStaffName ( Calculated Text )
           
          If ( Status = "Active" ; Name ; "" ) 

           

          Then edit your value list to get its values from 'ActiveStaffName' instead of 'Name' 

           

          I hope this does the trick for you. 

          • 2. Re: Value list based on field contents subject to another value
            andyg4137
              

            You're a star thanks mate,

             

            now i have this list, is it easy to set this as values in a repeating field when i create a new record, but leaves the values in other records as they were ( ie when a member of staff leaves, it will not delete their name off the timesheet records?

            • 3. Re: Value list based on field contents subject to another value
              Orlando
                

              If you are setting a field to the value of the value list, when someone is made inactive they will not be removed from that field in that record, only removed from the value list.

               

              This may cause you problems if you rely on the drop-down list to perform searches, if someone is inactive they will not appear in the list for searching.

               

              If this is a problem you can create a duplice of that field on your layout, assign it to a value list set to show all staff, as you originally had it setup, and change the behavior on both so one is only enterable in Browse Mode and the other only enterable in Find Mode. and place the Find Mode field directly under the Browse mode one, does this make sense???

               

              If you want me to explain further on this do let me know.