July 21, 20223 yr 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 July 21, 20223 yr by WF7A
July 21, 20223 yr 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 July 21, 20223 yr by comment
July 21, 20223 yr 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