AnsweredAssumed Answered

Cross-Platform Open URL to open synced folder - FileMaker 15 Pro

Question asked by acuriousboonz on Apr 21, 2017
Latest reply on Apr 22, 2017 by acuriousboonz

Hello,

 

As a scientist, I generate a considerable amount of experimental data from instruments. These experiments generate several folders and a lot of small files, all of which are stored in a folder named after the date on which the data was obtained.

 

Currently, these folders are stored on Google Drive.

 

I'm trying to create a script in FileMaker 15 Pro using the Open URL command to open these folders in their corresponding records. I have a Mac laptop for work and a Windows PC at home. Both of the computers can access the data but the file path on each operating system is slightly different. For example.

 

Mac: file:///Users/Name1/Google Drive/Institution/Lab Name/Instrument Type/Instrument Name/04-21-2017

 

where "04-21-2017" is the name of the folder that contains the experimental data.

 

Whereas on PC the path is: file:///C:/Users/Name2/Google Drive/Institution/Lab Name/Instrument Type/Instrument Name/04-21-2017

 

Currently, starting on my Mac, I type the file path of folder "04-21-2017" into Field1, use a button to activate the script

 

     Insert Text [Select; Table::Field2; "file:///C:/Users/Name1/"]

     Set Selection [Table::Field1; Start Position: 31; End Position: 98]

     Copy [Table::Field1]

     Paste [No style; Table::Field2]

 

to automate converting the Mac file path from Field1 into the corresponding Windows file path and paste it into Field2.

 

And then another button to activate a script to try and open both the mac file path and the windows file path simultaneously. Only the file path that corresponds to the operating system I'm using actually opens the folder, as expected.

 

     Open URL [With dialog:Off; Table::Field1]

     Open URL [With dialog:Off; Table::Field2]

 

This works but I'm still learning how to use FileMaker Pro 15 - is there a better way to do this?

 

Also, I'd really like to be able to drag and drop the folder from Google Drive onto Field1 and have the program automatically write the corresponding file path to that field. Is this possible?

 

Any help would be greatly appreciated, thanks!

Outcomes