11 Replies Latest reply on Oct 4, 2012 6:38 AM by powell

    External Data Source variable?


      I understand there is no way to set a variable for an external data source,


      but is there a scripted method to edit the IP part of the data source when it changes?


      I have a Go file that will connect to a served Main file. The Main file will be deployed on many different servers, the Go file will be deployed on many different iPads.


      The Go file will from time to time pull data from its Main file.


      I want a simple technique to let the user set the data source upon deployment on the iPad and then not need to change it.





        • 1. Re: External Data Source variable?

          Michele -


          There's no way I know of to allow the user to configure this (without being prompted, that is). However, in the Manage External Data Sources dialog, you can set up a list of sources. You can do this by IP (as you already know), or by server (i.e. DNS) name. If you know the names of the servers in advance, you can include all the possible servers where the Main file will be located in the list. The client will then go down the list, one at a time, until it locates the database.


          Is this adequate?



          • 2. Re: External Data Source variable?

            Thanks Mike, that is what I saw as well. This would work for those situations where I knew the server IP in advance, but I don't plan to know that for all users of the solution.


            Thus I would like for them to be able to dynamically set the fmnet address without having to get into the inner workings. It may not be possible, but I was hoping someone knew of a technique.

            • 3. Re: External Data Source variable?

              I'm a little puzzled. You don't know what server the hosted database will be on? Does it belong to someone else or something?



              • 4. Re: External Data Source variable?

                Here is the plan. (I may be missing something; I appreciate another look.)


                I am building a system for small business that will be deployed most of the time on FileMaker Pro, not FileMaker Server. It is intended for 1-5 employee contracting businesses, with typically one office staff person. It is unlikely that many will need server deployment.


                However, there is a component to the system that is a separate file that will reside on a iPad. This is for the worker in the field where s/he can record supplies, labor, etc. on the job. These edits or additions will flow back into the main file hosted by FMP.


                The Go file is intially transferred to the iPad using a variation of the "One Click" technique described by Colibri Solutions in 2011. This works great for initial deployment of the file, but the file on the iPad will need updated data for some tables (supplies, labor) from time to time and replacing this file with a new one each time is not a good choice at this point, since it will have OJT entries.


                I use the Open URL script to pull updating supplies and labor.


                Another update of the data in the iPad can occur when the worker readies to travel to a new job and needs to load the job data from the Main file. This update ... or import of data ... does not work well using the Open URL (which lets me circumvent management of external data sources). It does not work well because Open URL always seems to pull an entire table of records, rather than the select few that are needed.


                So for that update ... the importing of new job records ... I have used a direct Open File, followed by a Perform Script calling the script in the served file... which isolates the appropriate records which are then imported into the iPad file.


                I have just begun experimenting with Open URL (as you can tell by a previous post of mine) so it may be that I need to refine my script and/or logic and that step can work in this location.


                Using the Open File step on the iPad requires a data source in the Go file to the served file. Since the deployment is planned for many small businesses and I will not know their IP addresses, I am looking for a means to remove the need for the fmnet://x.x.x.x./FileName as a data source.


                Thanks for thinking about this Mike.

                • 5. Re: External Data Source variable?

                  Are you wanting to avoid involving yourself in the deployment? (Presumably, the answer is "yes".)


                  If so, perhaps instead of trying to attach directly to the hosted database, an intermediary file might work. That way, you can reload the intermediary file (overwriting it completely), then load the records from the local file rather than trying to hook up to a networked file whose IP address will likely change (especially in a situation where you don't have fixed IP addresses).


                  Might that work?



                  • 6. Re: External Data Source variable?

                    The answer is Yes. I want to avoid my involvment in deployment.


                    I did try the technique you describe... unfortunately...(after spending quite a few hours on this --- that is the way we learn), a Go file cannot import from another FileMaker Go file. It might be possible to send a text or tab file to the iPad, but for it to import without a problem the file needs to go into the FileMaker "Desktop Folder" on the iPad. Other than the one-click method (which means once again a connection to a server that the IP address will not be known in advance), I've not been able to come up with a smooth "transparent to the user" method of getting the data on to the iPad in the correct location.


                    I continue to test and try other options, so I appreciate your thoughts. But so far, I've not found anything that works as simply as I want it to.

                    • 7. Re: External Data Source variable?

                      Don't try to use Import. Besides the fact it won't work on Go  , there are other issues with it (like record lock, error trapping, etc.). Instead, write a script that loops through the records and use Set Field and temporary relationships through global fields to create the new records. You can do this either in the intermediate file or the mobile app. I'd recommend the intermediate file, since you can replace it more easily than you can the umpty-squat mobile files (and you avoid dealing with the local data to boot).


                      If that doesn't make sense, let me know and I'll explain further.



                      • 8. Re: External Data Source variable?

                        This might be an unexpected but great solution.


                        Refer to the FM PRO (or server) file indicating a star (*) instead of the IP address


                        data sources.jpg


                        The client (for instance FM GO) will look in the network for any data file hosted by a FM PRO (or Server).

                        • 9. Re: External Data Source variable?

                          I'd recommend being very careful with that. If your network is of any size whatsoever, using the wildcard in your reference path can result in a really horrible performance impact. We saw that a lot when .fp5 solutions were converted up to .fp7.



                          • 10. Re: External Data Source variable?



                            I believe that MirrorSync from 360Works might be a good fit for what you describe. If you haven't already, take a look on their web site for more info. I can't remember off hand if it requires FM server or if it can work with regular FM client acting as a server.


                            Even if it is not a good fit due to cost or other reasons, it is worth knowing about.







                            • 11. Re: External Data Source variable?

                              It looks like that 360works runs only on FM Server.

                              You could try with gozync: