If you have in the External Data Source 2 file references:
FileMaker will always open the local "myfile" if it exists, and if it doesn't, it'll try to open "myfile" on the server,
And I don't think that's what the OP wants.
I think he wants to be able to say, "I'd like my UI file to connect to the local data file" and then, the next day, "I'd now like my UI file to connect to the remote data file".
The only way to do this is to rename or move the local data file so FileMaker can't find it, and it'll therefore "fail over" to the hosted data file.
- a "launcher" file with a script which asks the user which file they want to use
- the above script CAN NOT make any reference to either the local or hosted data file (I'll explain why in a second)
- that script then moves / renames the local data file depending on the user's selection
- that script then calls another script which actually opens the data file
Why can't the first script, which asks the user which file they want have a script step which opens the data file?
Because the moment a script is run that references the data file, FileMaker will open (in the background) the data file and it'll first look for the local data file, probably find it, and then even if you rename or move the local data file, FileMaker won't care and will only use the local data file.
Also remember, that just because you can specify more than one file refernce for an External Data Source, it doesn't mean FileMaker looks from top to bottom.
So, if you're external data source file list is:
and you happen to have "some.fmserver.com/myfile" open in the background (because some script referenced that data file), when you go to actually open the data file, FileMaker will say, "well, I've already found the hosted data file so I won't even bother looking for the local data file".
Anyway, switching between local and remote data files can be done (I use it in my solutions). It's just a hell of a learning curve to work out how FileMaker references files.