Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2620 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I have created an "opener" file called "OpenMP" that is located on the Windows Desktop.  Also, a global variable for the directory where the FMP14 files are located called "$$marinaDir" = "MarinaPro v17".

When activated the launcher opens but does not open the target file using the following file path, "filewin:/C:/$$marinaDir/Marina.fmp12."  However if I substitute with the following, "filewin:/C:/MarinaPro v17/Marina.fmp12"; all is good.

The script elements follow:

#Create variable...
Set Variable [$$marinaDir; Value: "MarinaPro v17"]
#Start MarinaPro...
Open File ["Marina"] (Marina File Path: filewin:/C:/$$marinaDir/Marina.fmp12)

What am I missing?

Edited by JH Howland
My bad, Work in FMP11, 14 & 16
Posted

"filewin:/C:/$$marinaDir/Marina.fp7."   is seen as a string and therefore $$marinaDir doesn't change.

"filewin:/C:/" & $$marinaDir & "/Marina.fp7"

 

Posted (edited)

Doesn't work, creates a File Path entry error.  I can change the file path to: 

filewin:"/C:/" & $$marinaDir & "/Marina.fmp12", however it still does not launch "Marina.fmp12" ?

Edited by JH Howland
My bad, Work in FMP11, 14 & 16
Posted

You'll want to set the variable to the entire path and then enter just the variable

$$marinaDir = "filewin:/C:/MarinaPro v17/Marina.fp7"

Open File ["Marina"] (Marina File Path: $$marinaDir )

Posted (edited)

Doesn't work, creates a File Path entry error.  I can change the file path to: "filewin:$$marinaDir" ($$marinaDir = "/C:/MarinaPro v17/Marina.fmp12"), however it still does not launch "Marina.fmp12".

File path will only work as "filewin:/C:/MarinaPro v17/Marina.fmp12".

Variables in file path should work, but do not for reasons unknown.  I cannot even get the Filemaker Help "Examples of using variables in file paths" to work.

Edited by JH Howland
My bad, Work in FMP11, 14 & 16
Posted

This thread is weirder than shoes on a snake. Please answer my question above. Also clarify why this is posted in FileMaker Pro 14 section, when your profile shows version 11 and you are trying to open a .fp7 file. This part:

On 9/10/2017 at 11:59 PM, JH Howland said:

Open File ["Marina"] (Marina File Path: filewin:/C:/$$marinaDir/Marina.fp7)

also makes no sense: the Open File [] script step does not have a second part that looks like that. 

Posted

Yes, I think to your question (Filemaker Pro "External Data Sources", then "File Path list" to enter a global variable for a directory name ($$marinaDir) that may be different on different computers as well as a variable for different users ($$winUser), not being discussed here.

As stated I cannot get any $variable or $$variable to perform in a "File Path list".

Posted

According to the examples here:

http://www.filemaker.com/help/12/fmp/html/create_db.8.39.html

... your path should work. But -- possibly the slash in front of the drive letter needs to be removed from the variable and added to "filewin:" like so:

filewin:/$$MarinaDir

... where $$MarinaDir looks like:

C:/MarinaPro v17/Marina.fmp12

Posted

You still haven't clarified which version you're using. In any case, support for variables in external data source is a new feature of FileMaker Pro version 16.

In previous versions, you cannot use variables when defining a data source. This is mentioned in the help in at least two places:  
Creating file paths
Editing external FileMaker data sources

You could have also seen the difference between the hints listed in the Edit Data Source window:

ds.png.d79c75a8be854aa0625827c0496a1d2b.png

compared to those listed in (for example) in the Specify Output file dialog of the Export Records script step:

ex.png.c5e531d1509128c1d266c0c01cf3bf44.png



Posted
14 hours ago, Fitch said:

According to the examples here:

http://www.filemaker.com/help/12/fmp/html/create_db.8.39.html

... your path should work. But -- possibly the slash in front of the drive letter needs to be removed from the variable and added to "filewin:" like so:

filewin:/$$MarinaDir

... where $$MarinaDir looks like:

C:/MarinaPro v17/Marina.fmp12

Thanks Fitch.  I have tried that as well, but no happiness.

Thank you Comment.  To clarify further, I am in the process of converting an .fp7 solution (MarinaPro Marina Management solution with 18 relational db elements) to an .fmp12 solution.  I am using FMP 14 advanced for this purpose.

Are you saying that the "Examples of using variables in file paths" in FMP 11 and 14 Help are not able to be utilized within an "External Data Sources -> File Path List?

If not, why are file path examples utilizing $variable and $$variable outlined in FMP 11 and 14 help.

Obviously I am still missing something here.

Posted (edited)

I suspect that whilst FM16 can support $$ variables in the 'Specify Output File' dialogue, they cannot be embedded in other strings.

If you define $$pathToFile in a script before attempting to open the file, it may work

So put

Set Variable ( $$pathToFile; "filewin:/C:/" & $$marinaDir & "/Marina.fmp12")

in a script before attempting to open the file

and in the 'Specify Output File' dialogue box, just put

$$pathToFile

with nothing else on that line

 

Does that work?

Edited by rwoods
Posted
1 hour ago, JH Howland said:

Are you saying that the "Examples of using variables in file paths" in FMP 11 and 14 Help are not able to be utilized within an "External Data Sources -> File Path List?

Yes, that is exactly what I am saying. On the same page, you will find this note:

Quote

• Variables are not supported in FileMaker data sources. For more information on data sources, see Editing external FileMaker data sources.

 

1 hour ago, JH Howland said:

why are file path examples utilizing $variable and $$variable outlined in FMP 11 and 14 help.

Because variables can be used in other file paths - for example, in the Export Records [] script step.

 

 

Posted (edited)

Yes indeed, it is a non-starter if not using FM16!

 

PS Does 'non-starter' make any sense outside of the UK?

Edited by rwoods
Posted
5 hours ago, rwoods said:

I suspect that whilst FM16 can support $$ variables in the 'Specify Output File' dialogue, they cannot be embedded in other strings.

If you define $$pathToFile in a script before attempting to open the file, it may work

So put


Set Variable ( $$pathToFile; "filewin:/C:/" & $$marinaDir & "/Marina.fmp12")

in a script before attempting to open the file

and in the 'Specify Output File' dialogue box, just put


$$pathToFile

with nothing else on that line

 

Does that work?

Yes, it does in FMP 16.  No, in FMP 11 and 14 as Mr. Comment has pointed out.  I have to admit to not understanding the FMP Help info. with regard to use of file paths with variables.

Posted
1 minute ago, JH Howland said:

I have to admit to not understanding the FMP Help info. with regard to use of file paths with variables.

There are different kinds of file paths. Some of these support the use of variables and some don't. External data sources are the kind that doesn't (until version 16).

This topic is 2620 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.