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.

Problem setting Desktop Path with Summary Fields

Featured Replies

Howdy, howdy:

I use a variable to set the desktop path with the calculation:

Set Variable [$_DesktopPath; Value: Get ( DesktopPath ) & "ESU 7 Events: " & EVENT_PARENT::EventDate_Min__lxs & ".pdf"

...but it's hanging up on the EventDate_Min__lxs summary field--I get the error message, "2022.pdf" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk." (BTW: The date in the summary field is 7/30/2022, hence the 2022 part of the error message, I reckon.)

If I were to just use plain text:

 Get ( DesktopPath ) & "ESU 7 Events: " & ".pdf"

...it works fine. Mind you, there are no existing files on the desktop with those names so it's not a filename conflict.

I tried making the summary field as text ( GetAsText ( EVENT_PARENT::EventDate_Min__lxs ), but that didn't help. I also saved the date as a variable and popped that into the desktop path calculation, but that didn't work, either.

So, what's the trick to include a date (from a summary field) into a filepath?

TIA for your help.

 

Edited by WF7A

26 minutes ago, WF7A said:

The date in the summary field is 7/30/2022

Then your calculated path looks something like:

/Macintosh HD/Users/YourUserName/Desktop/ESU 7 Events: 7/30/2022.pdf

(you can verify this using the Data Viewer or a custom dialog) and Filemaker is looking inside the desktop folder for a folder named ESU 7 Events: 7  and cannot find it. If your date separator is "/" and you want to include the date in your filename, you must substitute it with another character or remove it altogether. You might also consider changing the format to YYYYxMMxDD, so that it sorts correctly.

P..S. I would also be reluctant to include a colon in a file or folder name. In most cases it won't cause any problems, but I have been bitten once (admittedly, in a very special case) and avoid it since.

 

Edited by comment

  • Author

Thanks--that did the trick...and you're right about the colon, too--it hung up the calc as well.

For others' benefit, here's the calc I used to format the dates:

SerialIncrement ( "00" ; Month ( DateField ) ) & SerialIncrement ( "-00" ; Day ( DateFIeld ) ) & "-" & Year ( DateField )

 

Now to figure out why Save Records as PDF doesn't play well in WebDirect. 

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.