1 2 Previous Next 22 Replies Latest reply on Jun 21, 2011 2:21 PM by philmodjunk

    Drop down List

    arthursc

      Title

      Drop down List

      Post

      Hello,

      I Have a Table that has the following fields;

      __PKSpecies_Id; unique-serial_number

      Species_name:Text

      Species_Sex:Text

      species_Age:Text

      image;container

      Notes:Text

      This table only has 5 records which are static. i.e. They cannot be added to. I would like to create a layout that will allow the user to select from the drop down list (Species_Name) and then the record for that spieces is displayed along with the other field details.

      I suppose you would call it a "drop down List to the next record".

      I have tried this but the record allows me to change the species name etc. I want this table locked. No additons or deletions.

      How can I do this? in layout mode.

      Regards

      Colin

      MyRelationships_V3.jpg

        • 1. Re: Drop down List
          TurtleKoala

          I'm not positive that I know what you are asking for, but you may be looking for the "Prohibit modification of value during data entry" option. This will prevent anybody from modifying a certain field in your table. You can get to this in the fields tab of the Manage Database menu. Select the field that you want to prevent from being modified and then click the "Options..." button. In the "Auto-Enter" tab, check the box for "Prohibit modification of value during data entry."

          • 2. Re: Drop down List
            philmodjunk

            Another option is to prohibit field entry for a given field on a given layout. This is a setting in the behavior section of the Inspector's Data tab. If you clear the Browse check box, users will be unable to enter and edit the field on that layout. This is often a useful option when you display data from a related table on your layout that you want to be "read only".

            • 3. Re: Drop down List
              arthursc

              Hi All.

              Thanks for the replies.

              Restrciting the fields I now understand. But how can I ensure that the layout shows a user to select the "species_tyoe" from a drop down list?

              regards

              Colin.

              • 4. Re: Drop down List
                philmodjunk

                If you have a relationship such as:

                LayoutTable::DropDownField = Species::__PKSpecies

                Where Species is the table you describe above and your value list uses fields from Species with __PKSpecies as field 1 and Species_Name as Field 2, You can simply add the fields from Species to this layout. When you select a value in the drop down, the fields you added should display the appropriate data from that record in Species.

                • 5. Re: Drop down List
                  arthursc

                  Hi Phil,

                  Ok, So as I understand it create a new table Called Species_layout then create a relationship from the new table to my species table and select __PKSpecies. The other stuff from value list I understand.

                  Thanks Colin.

                  • 6. Re: Drop down List
                    philmodjunk

                    It's hard to say exactly what you need for your layout as I don't know how you will use this data once you make a selection from the drop down list.

                    • 7. Re: Drop down List
                      arthursc

                      Hi,

                      Well the data is just to provide information about the species. No more than that really. The only caveat is that when the users create a record of the beast they have culled in the "cull" table then the species table needs to queried to proceed the following;

                      Species name

                      Sex

                      Age.

                      Regards

                      Colin.

                      • 8. Re: Drop down List
                        philmodjunk

                        Then presumably, you'd want a table to document each such "cull" and that would be your second related table here. Depending on how you will manage this data, you may find it more appropriate to copy the data from the related table into this new table--which can be done by defining fields in the cull table with looked up value field options that copy the data from the species table.

                        You'll have to decide which option makes more sense for how you'll use the data. With looked up value settings to copy the data, changes made to the records in the species table would not automatically change what data is displayed on the "cull" layout. If you used my original suggestion, such changes would appear automatically.

                        • 9. Re: Drop down List
                          arthursc

                          Looking at your original suggestion, I think this relationship is set up.

                          All I need to do is make sure that when a hunter logs a cull then they can select the spices, species sex and age.

                          Please see the newly attached relationships image to verify in the top post.

                          Regards

                          Colin.

                          • 10. Re: Drop down List
                            philmodjunk

                            What exactly is the purpose of each table that you have for species, sex and age? (what data besides the value identified in the table occurrence name is stored in these tables?)

                            What you have will work, but I'm curious to know just a bit more here in case there is a better option.

                            I am assuming, also, that one record in SWDM_Culls represents a single animal that has been culled.

                            • 11. Re: Drop down List
                              arthursc

                              "If you have a relationship such as:

                              LayoutTable::DropDownField = Species::__PKSpecies

                              Where Species is the table you describe above and your value list uses fields from Species with __PKSpecies as field 1 and Species_Name as Field 2, You can simply add the fields from Species to this layout. When you select a value in the drop down, the fields you added should display the appropriate data from that record in Species."

                              As you described above. I have done this but when i a species from the drop down list, following happens;

                              Let say I have,

                              Record Id 1  Name:Red

                              Record id 2  Name:Roe

                              Reocrd id 3  Name:Sika

                              in the list. I select from the drop down Roe. Roe is then replaced with ID 3. and that updates the record spices name from roe to id 2. I then have to go back to the table from the layout and change it back.

                              I just want it to display what is in the tble without edits. I.e. i select red, then red appears and the information about that species and again if I select ski and roe.

                              Regards

                              Colin.

                              • 12. Re: Drop down List
                                arthursc

                                .....I am assuming, also, that one record in SWDM_Culls represents a single animal that has been culled.

                                Correct.

                                • 13. Re: Drop down List
                                  arthursc

                                  Phil, 

                                  PM Sent explaining alittle more.

                                  Colin.

                                  • 14. Re: Drop down List
                                    philmodjunk

                                    _FK_Species_ID should store the ID number of that species (1, 2, 3 etc.) not the species name (Red, Roe, Sika, etc).

                                    Then, add the Species Name field from your SWDM_Species table occurrence directly to the SWDM_Culls layout. When you select a species by name in the drop down, you'll see, say 2 appear in the _FK_Species_ID field, but you'll also see Roe appear in the name field next to it. In like manner, add any other fields from the SWDM_Species table occurence that you need to your layout.

                                    1 2 Previous Next