Jump to content
Server Maintenance This Week. ×

Problem setting Desktop Path with Summary Fields


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

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

This topic is 645 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.