9 Replies Latest reply on Jul 9, 2017 6:41 PM by gofmp15

    GPS data

    PaolaBouley

      Hi,

      I am a biologist and am working in a FMP database that allows me to log surveys (date, time location etc).  For each survey though I have multiple GPS locations to enter for any specific resources that I want to map.  For e.g. a certain plant.  If I wanted to list all the locations on the survey that I found a specific plant, how would I enter the list of GPS locations and have them connected to the survey record? 

       

      What is the best way to go about entering this data so that I can easily then extract it later for use in Google Maps or GIS?  any tips most appreciated!  thank you. Paola

        • 1. Re: GPS data
          user29424

          If you are running FMP 12 or higher I would recommend using the Location script step on an iOS device such as an iPad or iPhone.

           

          This returns the coordinates and you can then use them to pinpoint a location on a map.

           

          See: Location

           

          You can embed a web based map in a web viewer within FMP and apply your pins there using the coordinates within the map url:

           

          See: html - Url to a google maps page to show a pin given a latitude / longitude? - Stack Overflow

           

          Your structure would be a parent table that you could regard as your survey, then you would record your findings for each resource in a child table that would then be related to the survey. You can then list all the findings related to one survey in the the survey record either through a portal displaying the related child records or a virtual list generated by either an action or user triggered script.

           

          See: Reviewing relationships types

          • 2. Re: GPS data
            fmpdude

            Interesting reply. Good info there.

            • 3. Re: GPS data
              PaolaBouley

              Thanks for the tips.  It's still not clear to me to how to be able to enter

              multiple coordinates in a separate table yet have them linked directly to a

              single survey in another table.

              • 4. Re: GPS data
                philmodjunk

                List ( )

                ExecuteSQL( )

                 

                can both pull data from multiple records in another table.

                • 5. Re: GPS data
                  user29424

                  You should look at the links I posted, one of them explains how you would link the tables together.

                   

                  You would basically make two tables, let's say you call one surveys (parent) and the other one resources (child). In the parent table you'd have a field called id with an incremental serial value that is auto entered (hit the option button for the field once you've created it) for each record created. In the parent table instance we call this field a primary key, you'd then have an equivalent field in the child table that does not auto fill with an incremental serial number, but inherits the id number (this is called a foreign key) from the parent table upon creation of a child record.

                   

                  Screen Shot 2017-03-26 at 23.53.37.png

                  You then link these two tables together in the relationship chart within filemaker using the id field. Just drag from one field to the other and the relationship is created. You can double click the relationship line and set a number of options and make the relationship more complex/advanced.

                  Screen Shot 2017-03-26 at 23.55.45.png

                  The simplest way to show the related entries in a survey is by adding a portal from that relationship to a layout for the survey table. The portal options will allow auto creation of related records, you that way you don't have to worry about writing scripts to set the id number that creates the relationship - that happens automatically.

                   

                  I hope this explains things better. YouTube is full of videos that explain some of these things very well. Just search for some of the keywords from the text above and you should find something useful.

                   

                  I hope this helps.

                  1 of 1 people found this helpful
                  • 6. Re: GPS data
                    PaolaBouley

                    Hi, this helps a lot - many thanks.  I get this part, as I have other child

                    tables linked to my Survey.  But in this case, For each survey I want to

                    add say 20 GPS locations indicating a resource... how do I click

                    out/transfer from the Survey to the child table+layout and back?

                    • 7. Re: GPS data
                      Magnus Fransson

                      Hi Paola,

                       

                      PaolaBouley wrote:

                       

                      ... how do I click

                      out/transfer from the Survey to the child table+layout and back?

                      You don't. You do it in a portal, on the same layout.

                       

                      With best regards Magnus Fransson.

                      • 8. Re: GPS data
                        user29424

                        In addition to displaying multiple child records in a parent layout you can add a button with a single script step called GoToRelatedRecord in a portal row, this could take you to a different layout displaying the related entry.

                         

                        See: Go to Related Record

                         

                        To go back to the main layout you can use a script step called GoToLayout

                         

                        See: Go to Layout

                         

                        You could also add a popover button in the portal which would enable you to view more details of each child record without leaving the main layout.

                        1 of 1 people found this helpful
                        • 9. Re: GPS data
                          gofmp15

                          PaolaBouley wrote:

                           

                          Hi, this helps a lot - many thanks. I get this part, as I have other child

                          tables linked to my Survey. But in this case, For each survey I want to

                          add say 20 GPS locations indicating a resource... how do I click

                          out/transfer from the Survey to the child table+layout and back?

                          One method where you don't have to exit and doesn't require entry into a portal is to script the creation of the child record;

                           

                          Set var $parentID to parentid

                           

                          ----

                          go to layout table or form etc in child table

                          create record

                          set field parentidlinking field to $parentID

                          set gps field <--- here the gps data could be in a variable etc.

                          commit record

                          go to layout original layout

                           

                          ----

                          OR

                          new window using layout in child table'

                          new record

                          set field parentidlinking field to $parentID

                          ....fill in the fields on the layout

                          commit record

                          close window