1 2 Previous Next 16 Replies Latest reply on May 20, 2015 3:53 AM by stephensexton

    FMGO 14 - Import/Export

    alice07

      Hi all,

       

      every year, the day before a new release, you cannot find almost any rumor. Sounds cool...

       

      Does anyone know if anything changed in FMGO14 regarding record import/export.

       

      In release 13 you could only export records in some formats but fmp12 and besides you could only import records from fmp12...

        • 1. Re: FMGO 14 - Import/Export
          mikebeargie

          According to the official documentation:

          Import Records

          Export Records

           

          There is no changes between Go 13/14 as far as import/export goes.

          • 2. Re: FMGO 14 - Import/Export
            alice07

            ok, thanks.

            That's really a pity.

            Export and import can easily solve many cases when I need to copy data from one table to another.

            Of course I can loop through records to copy but it is dramatically slower.

            • 3. Re: FMGO 14 - Import/Export
              mikebeargie

              If you just need to move records from one table to another, can’t you just import to the target using the current file as the source? I’ve done that before, and pretty sure it works in go.

              • 4. Re: FMGO 14 - Import/Export
                alice07

                uhm, no.

                In that case you would only able to import all source records to the target.

                It is not selective.

                • 5. Re: FMGO 14 - Import/Export
                  mikebeargie

                  well, if you have a use case where you need to copy data from one table to another, like an initial configuration of a go file, then it's still a useful technique. It's only limited in the capacity that it can't do a match existing import.

                   

                  A lot of devs will just want to pull an initial set of data to configure a file. For example if you installed EasySync and you want to pull a large set of initial records that would crash FMGo. Having a TO to a data source and then importing using that TO as the source inside of the same file is a useful technique.

                  • 6. Re: FMGO 14 - Import/Export
                    stephensexton

                    It can be done.  You need to generate the desired found set of records to import first... then, keeping that window open, go to a new window and switch to the layout that you want to import the records to.  The source file is the current file.  After creating the import records script step, you may then want to change the source filename to a variable (e.g. $filepath from Get(file path) at the top of the script) so that it doesn't break with a change in filename in the future.

                    • 7. Re: FMGO 14 - Import/Export
                      alice07

                      cool !

                      • 8. Re: FMGO 14 - Import/Export
                        mikebeargie

                        Thanks Stephen, I thought there was a way to do it but couldn’t remember what it was.

                        • 9. Re: FMGO 14 - Import/Export
                          Fred(CH)

                          stephensexton a écrit:

                           

                          […] It can be done.  You need to generate the desired found set of records to import first... then, keeping that window open, go to a new window and switch to the layout that you want to import the records to. [...]

                          I obviously missed something and would like to understand :

                           

                          If you don't open a new window and switch directly from layout/OT 1 to layout/OT 2, why would the foundset from layout/OT 1 be ignored by the import step using the active file ?

                           

                          Is there a difference at this level between Go an Pro ?

                           

                          Thank you so much in advance !

                          • 10. Re: FMGO 14 - Import/Export
                            stephensexton

                            There doesn't seem to be a difference between Go & Pro from what I have seen... I run the same scripts successfully in both.  I can only say that when I was testing these scripts, I could only get it to work by the following sequence of script steps within the script:

                             

                            ...

                            Go to Related Records in a new window (e.g. from Contacts layout to a helper layout also based on Contacts)

                            Go to Layout (e.g. to a helper layout based on a different table, such as "Correspondence")

                            Import Records (e.g. from source=Contacts to target=Correspondence)

                            ...

                             

                            It seemed at the time of testing that Go To Related Records remembered the last found set of records differently to simply performing a search.  In case it is relevant, I just noted that my GTR script step opens the new window in Dialogue mode.  I think I only did that to prevent user interaction part way through the script.

                            • 11. Re: FMGO 14 - Import/Export
                              Fred(CH)

                              Still srange to me. I use almost once a day a self-file importation from a table occurrence (TO) where a found set was just created by a search and never noticed any problem to import this found set.

                               

                              Is there a chance that when it occurred to you, the original layout and the helper layout were from the same table but different TO ?

                               

                              Because the only reason to have a list of TO instead of a list of table themselves on a such import dialog, is because the memorized foundset is proper to each TO of a window and not only to each table. Thus it allow us doing exactly what we are talking for.

                               

                              Is there a chance that you GTRR step was fixing an issue doing a kind of GTO hooping (thanks wimdecorte) where you first didn't choose the according OT source in the import dialog ?

                               

                              stephensexton a écrit:

                               

                              Go to Related Records in a new window (e.g. from Contacts layout to a helper layout also based on Contacts)

                               

                              It seemed at the time of testing that Go To Related Records remembered the last found set of records differently to simply performing a search.

                              • 12. Re: FMGO 14 - Import/Export
                                stephensexton

                                Looking at my steps again, the GTRR step in a new window may have been purely to prevent closing or losing the original window and found set... it may also ensure that the last found set from that table occurrence is the found set that I am wanting to import to the other table.  For example, if another window was open belonging to the same table occurrence, this could otherwise create problems with the wrong found set being imported.

                                • 13. Re: FMGO 14 - Import/Export
                                  Fred(CH)

                                  Yes, each windows handle its own found set for each OT. But maybe it is my english the fault. If you just run a script with only such step without opening any new window:

                                   

                                  Search Mode

                                  Set Field

                                  Execute search

                                  Go to Layout

                                  Import record

                                   

                                  Did you get the expected result ?

                                  • 14. Re: FMGO 14 - Import/Export
                                    stephensexton

                                    Yes, that worked.  If there were multiple windows open from the same table occurrence, the import would include the found set from where the script initiated, even if it wasn't the window where the last search was performed.  So the GTRR step may only be necessary to prevent losing the original window (i.e. to keep it open).  Replacing GTRR with a simply "New Window" step did the same thing (perhaps more efficiently?).

                                    1 2 Previous Next