5 Replies Latest reply on Dec 19, 2012 12:17 PM by philmodjunk

    Auto Popuating Data Entry Portal Fields

    GregO'Connnor

      Title

      Auto Popuating Data Entry Portal Fields

      Post

           I'm working in FIlemaker Pro Advanced 12.  I'm working with 3 tables Client, Department and Staffing.  I have a Drop down box to select the Client Name from the Client table and another to select a Shift Date to be written into the Staffing Table.  I have a portal which allows for Data Entry into the Staffing Table below the Drop Down and Shift Date selection . I would like to populate the Shift Date and Departments in the Data Entry portal based on the which client and shift date were selected. Below is table diagram . I'm novice with Filemaker by the way

      Client Table                              Department Table                          Staffing Table

           Client ID  <---------------------> Client ID                                                Shift Date

           Client Name                             Deparment ID      < ----------------->   Department  ID

                                                               Department Name <-----------------> Department Name

                                                                                                                               Field 1

                                                                                                                               Field 2 .......

            

        • 1. Re: Auto Popuating Data Entry Portal Fields
          philmodjunk

               The portal is located on a layout based on which table? Department or Client?

               This apparent relationship:

               Department::Deparment ID = Staffing::Department  ID AND
               Department::Department Name =  Staffing::Department Name

               appears to have an unecessary pair of match fields. You should be able to remove the department name fields from the relationship and the relationship (and portal) should still function the same as it does now.

               

                    I would like to populate the Shift Date and Departments in the Data Entry portal based on the which client and shift date

               The deparment name field can be removed from the staffing table. You don't need it. Any time that you need the department name for a Staffing Table record, you can refer to the department name field from the Department table. I'm not sure what you have in mind for "shift date" as you do not show a shift date field in any table except Staffing. Thus, there is no where from which such a date can be "looked up". But if you want to add a single shift date field on the layout, outside of the portal such that each new Staffing record created in the portal automatically enters that selected shift date, this can be done if you define a Shift Date field in the department table and define an auto-enter calculation on the Shift Date field in Staffing that copies the value of this field from the related department record.

          • 2. Re: Auto Popuating Data Entry Portal Fields
            GregO'Connnor

                 The Portal is based on the Depatrment Table

            • 3. Re: Auto Popuating Data Entry Portal Fields
              philmodjunk

                   Good to know as the suggestions I made in the previous post were based on that assumption.

              • 4. Re: Auto Popuating Data Entry Portal Fields
                GregO'Connnor

                     I edited the table structure. It is now sturctured

                      

                Client Table                              Department Table                          Staffing Table

                     Client ID  <---------------------> Client ID                                                Shift Date

                     Client Name                             Deparment ID      < ----------------->   Department  ID

                                                                         Department Name                              Field 1

                                                                                                                                         Field 2 .......

                     For the shift date I have a text box outside the portal which the end user can pick the shift date. I would like the value of that  text box passed in to the Shift date Field in the Portal for every Department associated with Client Chosen.  Then the user can enter data into the empty fields (i.e. Field 1, Field 2 ) So that before the end user enters data the portal would look like the example below  after selecting Client and Shift Date.

                     For example. 

                           Drop Down For Client [Client 1]           Shift Date Text Box [12/18/2012]

                Portal

                Staffing::Shift Date            Staffing:: Dept ID     Department::Department  Name(Display only)      Staffing:: Field 1        Staffing:: Field 2  

                      12/18/2012                            001                                                 Dept 1                                                           

                      12/18/2012                            002                                                 Dept 2

                     12/18/2012                             003                                                 Dept 3 

                      

                • 5. Re: Auto Popuating Data Entry Portal Fields
                  philmodjunk

                       Define a field of type date, let's call it SelectedShiftDate in the department table.

                       Then find the ShiftDate field for staffing in manage | Database | Fields. Double click that field definition to open the Field Options dialog box.

                       Select the auto-enter tab and enter this auto-enter calculation:

                       Department::SelectedShiftDate.

                       Now put SelectedShiftDate on your Department layout and each new record in the portal should copy the contents of SelectedShiftDate into its Shift Date field.