3 Replies Latest reply on Dec 27, 2011 11:04 AM by philmodjunk

    Drop down menus

    DavidEnns

      Title

      Drop down menus

      Post

      I'm evaluating FP11 to see if it can meet my needs so I'm very new to database programming. When I enter a new value in a drop down menu and then tab to the next field I want that drop down menu to automatically update with the new value. As it stands now I have to click outside any field and then click the drop down menu for the new value to be in the menu.

      How can I auto update the drop down field with the new value when I tab to the next field. Thanks.

        • 1. Re: Drop down menus
          philmodjunk

          How have you defined your value list for this drop down list?

          I think you have specified that the value list list values from the same field you have formatted as a drop down list. If so, the record must be committed (and this happens when you click the layout background), before the value is available to the value list.

          You can use this script with an OnObjectSave script trigger to commit the record when you tab into the next field:

          Commit Record

          However, that could raise other issues if you do not want the record to be committed yet.

          • 2. Re: Drop down menus
            DavidEnns

            Its 'sortof' working but not correctly. The way I've set everything up is causing my problem. Let's see if I can explain what I'm doing based on my limited knowledge of terminilogy.

            1 Tables named trails & obstacles

            2 Each table has a field called trail ID and obstacle ID. I've linked the fields trails::trail_ID to obstacles::trail_ID and trails::obstacle_ID to obstacles::obstacle_ID

            3 On my Trails layout (linked to the trails table) I have a portal (I believe this is what you call it) to the obstacle table.

            4 My drop down menu (trails::obstacle_ID) is located on a tab in the trails layout.

             

            In a nutshell I want to record trail info with multiple obstacles. Each obstacle has multiple photographs and one video. Probably really simple for the more experienced. Sorry for being a little confusing but it does get better as I understand terminology more.

            • 3. Re: Drop down menus
              philmodjunk

              2 Each table has a field called trail ID and obstacle ID. I've linked the fields trail_ID::trails to trail_ID::obstacles and obstacle_ID::trails to obstacle_ID::obstacles

              I that won't work for you here. Since you have a one to many relationship, One Trail record to many related obstacle records, you should remove the Obstacle_ID fields from the relationship and just match by Trail_ID. If you enable "Allow creation of records via this relationship" for Obstacles in this relationship, you can simply add new related obstacle records by entering data in the bottom blank row of records in your portal. FileMaker will insert the appropriate Trail_ID value from Trail into the matching Trail_ID record in obstacles automatically.