2 Replies Latest reply on Jul 20, 2017 8:25 PM by shawnmberkeley

    Trying to create an open jobs report using a dropdown selector.

    shawnmberkeley

      The idea is to have a drop down menu which is used to select a single staff person, and then a button to run a report of all open jobs for that staff person.

       

      I created JOB::ContactID_StaffReport number field with an assigned dropdown menu showing values from Contact_ContactID_StaffList value list.  This value list displays values from CONTACT::ContactID_StaffActive (number) and CONTACT::ContactIDStaffNameFullActive (text).

       

      Selecting a staff member from the dropdown enters the person’s ID number in JOB::ContactID_StaffReport and name in JOB::NameFull_StaffReport.

       

      Then I created a Run Report button that runs the following script:

       

      Enter Browse Mode [ Pause: Off ]

      Freeze Window

      Enter Find Mode [ Pause: Off ]

      Set Field [ JOB::ContactID_Designer ; JOB::ContactID_StaffReport ]

      New Record/Request

      Set Field [ JOB::ContactID_Editor ; JOB::ContactID_StaffReport ]

      New Record/Request

      Set Field [ JOB::ContactID_Programmer ; JOB::ContactID_StaffReport ]

      New Record/Request

      Set Field [ JOB::JobStatus ; “Complete” ]

      Omit Record

      Perform Find []

      Go to Layout [ Report ; Animation: None ]

      Sort Records [ Restore ; With Dialog: Off ]

      Adjust Window [ Resize to Fit ]

       

      This unfortunately returns every open job, rather than just those of the staff member selected. 

       

      If I change the Set Field values such as the following:

       

      Set Field [ JOB::ContactID_Designer ; JOB::ContactID_StaffReport ]

      to

      Set Field [ JOB::ContactID_Designer ; 481 ]

       

      the script correctly finds all open jobs for designer #481.

       

       

      The relevant relationship is set up the same as all the similar fields, like JOB::ContactID_Designer.  It is

       

      CONTACT::ContactID_Staff = JOB::ContactID_StaffReport

       

      CONTACT::ContactID_Staff is a calculation – Case ( PatternCount ( ContactType; "Staff" ) ; ContactID ) – where ContactID is an Auto-enter Serial Number.

       

      Any help would be appreciated.  Please let me know if you need anything clarified.