Jump to content
Sign in to follow this  
Robin Penfold

The file $$PATH.DATA could not be opened. (Not Found)

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

Recommended Posts

I am working on an inherited system. It was originally just a single file. I split it into the separation model by duplicating the interface file to create a data file and then repointing all the interface file TOs to the tables in the data file.

The External Data Source is called DATA.

It contains the path $$PATH.DATA

Within File Options, the interface file is set to open on a temporary layout built from a table occurrence that has no relationships and no records

From here I then set a value into $$PATH.DATA before heading to a layout that references data from this file.


This is the default method for using Dynamic Data Sources:

"We want to make sure all the actions that need to happen before we set the data source variable will happen on a layout based on this table. In other words, do not access anything that uses the dynamic data source before setting the variable. Otherwise the user will get an error message saying data source can not be found."

I have used this method successfully many times on files I have built from scratch.

When I open the interface file I get the classic error:

    “The file $$PATH.DATA could not be opened. (Not Found)”

It then asks me to locate the file.

If I open the interface with the Script Debugger open, I get the same error message and it appears before the file is visible, or the opening layout, and there is no script running in the debugger - the OnFirstWindowOpen trigger has not fired.

If I click OK to the error message and Cancel when it asks me to find the file, then the interface file becomes visible, showing the opening blank layout and the script debugger then starts to run the first line of the OnFirstWindowOpen script

It is as if something tries to access the DATA file from the very beginning.

I have confirmed that the layout that the interface file opens on is built on a TO that doesn’t have any relationships or records

The only object on the layout is a single piece of text.

I’ve used FMPerception to clarify references to the DATA file. It is referenced in 220 odd TOs and a couple of scripts steps. But when the file opens the TOs haven’t been accessed and the script steps haven’t been run.

I have tried many things that have not worked.

Three things, however, have successfully avoided the error:

1) using a hardcoded path to the file - inconvenient given what I am trying to achieve

2) deleting all the interface file TOs that reference the DATA file - everything breaks

3) deleting the interface file External Data Source DATA - everything breaks


Any help would be greatly appreciated

Share this post

Link to post
Share on other sites


Thanks for the references to Josh's comments.

I don't think that's going to be the case because the error is occurring before the onFirstWindowOpen script has kicked in. But I'll check out the scripting in light of his comments and see whether it helps!


Share this post

Link to post
Share on other sites

Can you post the text of the OnFirstWindowOpen script? Something there is likely referencing the data source. Even though the script may not have made it to the step that does it, the script's load process can trigger FileMaker to reach out to it. Thus generating the error you see. I've rarely seen a different cause of the problem you are describing...but I also know it's possible!

If we could see that script, it may help. Also, the Table Occurrence names that reference that data source.

Share this post

Link to post
Share on other sites

Also, I believe that you need to be careful of last window closed. Doesn't that load briefly before first window open?

Share this post

Link to post
Share on other sites

I don’t remember. There was a behavior change in one of the last few versions. And I don't remember now. 

I saw a similar post on the Community forum that seems to have resolved the issue. Suggestion was to delete the data source and recreate it. That seems to have resolved it in this case. 

Share this post

Link to post
Share on other sites

Thanks all for your input.

I've turned off both the onFirstWindowOpen and onLastWindowClose triggers and I still get the same issue.



Regarding the TOs, there are 220 TOs referencing DATA - 95% of the TOs

These are the setup details for the 'landing page' in File Options:



And the triggers in File Options:



Layout - only one text object:



Layout Manager shows no script triggers:



Manage Database - table that layout is built on:



And the data source returning the error:



I posted the same thing on the community yesterday. TSGal replied with some things to test. Not yet resolved though!



Thanks for all your help


Edited by Robin Penfold

Share this post

Link to post
Share on other sites

If you turn off the "Switch to Layout", where does the file open to by default? If you unhost the file, and go to your flashscreen layout and close the file, that will become the "default".

See if the error goes away. If not, maybe you can make clone of the file and send it to me back channel, and I can see if I can figure out where the connection is trying to happen.

Share this post

Link to post
Share on other sites


Thanks for your help.

I've gone into the File Options and set 'Switch to Layout' to be blank.

I still get the same issue.


As another puzzle piece that I think might be related:

If I open the file and set a hard-coded path for DATA then the data is visible in the interface file as expected.

I have a script for updating fields in a Quote and its Lines. It goes to a layout built from a session record in the interface file. It then references a the Quotes table in the DATA file and then has a portal showing the related lines from the DATA file.

When I run it locally using Perform Script it works fine.

When I run it on the server using PSOS the Go To Object step that puts the focus into the portal for the lines returns error 100 (File is Missing).

Seems very very odd.

I have setup various testing scripts that confirm that the OnFirstWindowOpen script runs correctly on the server and creates the session record.

If I change the code and before the Go to Object step I test IsEmpty(session_QUO::__ID) it returns True, meaning that it can't see the table.

Doesn't really make sense.

Thanks for your offer of looking at the file. TSGal is following up on some things. I'll see how that goes. You looking at an anonymised version of the file might be great.



Share this post

Link to post
Share on other sites

Can you copy the text of the first script that runs and paste it here? The first thing you need to do is a Perform Script that sets that variable with the datasource path.

Share this post

Link to post
Share on other sites

Josh, certainly could do that, but I've had it set to have no OnFirstWindowOpen script and I still get the error when I open the interface file directly.

Normally, I have an opener file for each client into which I set the current file names and paths for Dev, Testing and Live.

Depending on which I choose, that then calls a script in the target file which opens it. This means that the OnFirstWindowScript doesn't run and it just runs the targeted script.



 "performing a script in another file does not activate this script trigger in that file, even if the script creates the first window for that file. To have this script trigger activate in another file, open the other file using the Open File script step before performing the script in that file."

The OnFirstWindowOpen script thus only runs when I run a script using PSOS. It does Set Error Capture and Allow User Abort etc and then runs a subscript to create a session record.



Edited by Robin Penfold

Share this post

Link to post
Share on other sites

Not having any OnFirstWindowOpen script may be part of the problem. If the file loads all the way up, without that reference resolving, it will not work ever, until the file is closed and reopened.

Try a single-step script that just sets that variable.

Share this post

Link to post
Share on other sites

Josh, thanks for your further help

I now have an OnFirstWindowOpen script that contains a single line:

Set Variable [ $$PATH.DATA ; Value: "fmnet:/###/@@@_v1_0_13" ]


When I open the interface file directly with the Script Debugger open I get the ‘File not Found’. At that point, the Script Debugger is blank and I can see no file or layout.

It asks for the file and I click Cancel.

It then runs the single script and leaves me on the starting layout, built from the interface file TO with no relationships or records.


The Data Viewer shows the correct path in $$PATH.DATA


I then go to a layout that contains data from that DATA.

It shows <File Missing> in each of the fields


The first time:

I opened the graph which seemed to refresh the reference to the file and the TOs referencing the data file showed correctly.

When I closed it, the layout then refreshed so as to show the correct data from the DATA file.


Another time:

I went into the graph but it didn’t refresh and just showed <File Missing> for the TOs, even though $$PATH.DATA contained a known-good value.

I then went into External Data Sources and DATA and beneath $$PATH.DATA I added the reference to the file.

I then came out and it refreshed

I then went back in and removed the hard coded reference and then the data showed correctly

I then changed the reference to $$PATH.DATA___ and it wouldn’t save saying it couldn’t find the file.

But $$PATH.DATA worked having been ‘nudged’.


I think there is something abnormal going on!


Check out the same original post on the FileMaker Community site and TSGal’s responses



Thanks again

Share this post

Link to post
Share on other sites

@Robin Penfold 

If you want to send me a link to download the file or get access to it, I’d be willing to take a peek at it. Up to you. 

Send the link via private message if you decide to. 

Share this post

Link to post
Share on other sites

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

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

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