Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I have a script where I want to export a csv file and I would like it to work on both mac and windows.

At the moment it works fine on macs but is not working on Windows.

I have a script step to create a variable $path1

Substitute ( Get (DesktopPath) ; "Desktop/" ; "" )

Then in Export Records script step in "Specify Output File" I have:

filewin:/$path1/Dropbox (Millmaine)/Finance/FROG_Invoices/CREATIVE/$invoice_name
filemac:/$path1/Dropbox (Millmaine)/Finance/FROG_Invoices/CREATIVE/$invoice_name

I have checked with our operatives and the directory sequence after $path1/ is consistent (i.e. nobody has any additional folders/directories).

Our DB is hosted on Filemaker Cloud.

Any idea why it's not be working for those on Windows?

 

1 hour ago, millmaine said:

is not working on Windows

"is not working" is not a good description of a problem. How exactly does it fail? Is there an error message or an error number you can capture?

Edited by comment

filewin:/$path1/Dropbox (Millmaine)/Finance/FROG_Invoices/CREATIVE/$invoice_name
 

should be

”filewin:/“ & $path & “/Dropbox …”

you need to concatenate the $vars in the path. 

2 hours ago, bcooney said:

you need to concatenate the $vars in the path

No, not if you are specifying a path. You only need to do that if you're creating a string that will eventually be used as path.

 

6 hours ago, bcooney said:

Isn’t that the case?

If it were, how could this be possible:

On 9/20/2021 at 8:18 AM, millmaine said:

At the moment it works fine on macs

Also, OP said clearly:

On 9/20/2021 at 8:18 AM, millmaine said:

Then in Export Records script step in "Specify Output File" I have:

 

  • Author

My two favourite experts at odds!!

The problem manifests itself by no file being exported when Windows machine is being used. I will add some error capture alerts to the script. An added difficulty is being 1000km away from the operator and not having a Windows computer myself. 

It’s a rare thing when I disagree with  Comment, but my interpretation is that the $path is not valid. Why it works on Mac may be a consequence if some saved setting. Also, I typically construct the full path in a $path and that is all that is entered in the output dialog. Then, you can show us that path in data viewer. 

20 minutes ago, bcooney said:

my interpretation is that the $path is not valid.

It may not be a valid path - but not because of the reason you gave, but simply because the target folder does not exist in the specified location.

Another cause of failure could be lack of privileges for the target folder. It's sure going to be fun finding out which one is it from 1,000 km away...

 

  • Author

I had already checked that the path was valid. Got the user to run a script that retuned the file path. All as it should be.

On the windows computer we have run a FMP export script with error-logging on which results in an 800 error — "Unable to create file on disk."

The user gets the following alert from Filemaker:
"WC2282021-C-63768442785.csv" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk."

That seems to indicate that FMP doesn't know what's causing the error — only that it can't create the file.

The user has asked whether McAfee antivirus might have some bearing on it. What do you think?

 

  • 2 months later...
On 9/28/2021 at 12:41 AM, millmaine said:

The user gets the following alert from Filemaker:
"WC2282021-C-63768442785.csv" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk."

That seems to indicate that FMP doesn't know what's causing the error — only that it can't create the file.

Did you get this problem solved? Could you post the path you are using when you try and save the file?

@JMW please start another thread for your issue and tell us what problem you're encountering. 

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.