3 Replies Latest reply on Jun 20, 2013 8:52 AM by philmodjunk

    Create a value list of active employees only

    Dees

      Title

      Create a value list of active employees only

      Post

           I have a table that contains the following fields:-

           EmployeeId

           FullName

           Status

            

            

           This table contains employees that are active and inactive. I want to create a value list that displays only the active employees. How can I do that?

            

           Also I want to create a chart using the active employees and sales made by the employee per week. The sales table contains SalesID

           Amount

           Date

           EmployeeId

            

            

           How can I create a chart that uses a time frame of a week and uses only the active employees from the employee table gets the sale amount from the sales table and charts it.

            

           Thanks in advance

            

           Dee

                      
                     Preferences
      §
      1
      2
      3
      4
      5
      6
      7
      8
      9
      0
      -
      =
      Backspace
                           
      Tab
      q
      w
      e
      r
      t
      y
      u
      i
      o
      p
      [
      ]
                                
      Return
                                
                           
      capslock
      a
      s
      d
      f
      g
      h
      j
      k
      l
      ;
      '
      \
                           
      shift
      `
      z
      x
      c
      v
      b
      n
      m
      ,
      .
      /
      shift
                           
                                
                               English
                                     
                                     
      alt
      alt
                           
                      
                     Preferences

            

        • 1. Re: Create a value list of active employees only
          philmodjunk

               Assuming that you have this relationship between your two tables:

               Employees::EmployeeID = Sales::EmployeeID

               Perform a find on the Sales table specfiying "Active" in the Employees::Status field (use whatever value in status marks the employee as active.)

               This will find all sales data that is linked to an active employee.

          • 2. Re: Create a value list of active employees only
            Dees

                  

                  

                 thank you for the reply. Could you give an example The two tables are related by employeeId..

                  

                  

                 I have two layouts. One is for adding customers that contains a drop down called Employee Name. In this drop down I want to show only active employees. How can I do that. if I create a value list it selects all the employees whether active or not.

                            
                           Preferences
            §
            1
            2
            3
            4
            5
            6
            7
            8
            9
            0
            -
            =
            Backspace
                                 
            Tab
            q
            w
            e
            r
            t
            y
            u
            i
            o
            p
            [
            ]
                                      
            Return
                                      
                                 
            capslock
            a
            s
            d
            f
            g
            h
            j
            k
            l
            ;
            '
            \
                                 
            shift
            `
            z
            x
            c
            v
            b
            n
            m
            ,
            .
            /
            shift
                                 
                                      
                                     English
                                           
                                           
            alt
            alt
                                 
                            
                           Preferences

                  

            • 3. Re: Create a value list of active employees only
              philmodjunk

                   Will you be performing the find manually or in a script?

                   A script might look like this:

                   Go to Layout ["Sales" (Sales)]
                   Enter Find Mode [] ---> clear the pause check box
                   Set Field [Employees::Status ; "Active" //I am guessing that the text "active" marks an employee as active ]
                   Set Error Capture [on]
                   Perform Find[]
                   Sort[Restore ; no dialog]---> I'm guessing that your chart will need the records sorted