Usually, that indicates a syntax error in your expression. A parenthesis in the wrong place, a variable name is misspelled or something. I can't spot the error in the above expression that goes with your error message, however. Is this expression a direct copy and paste from FileMaker?
You don't acutally need platform specific file paths here. You can actually use "file:" in place of "filemac:" and "filewin:" and it will work on both platforms. So you can simplify this expression to remove the need for your let function and the val temporary variable.
Everything after Let function was pasted from FMP, I tried again and got "The specified table can not be found" for table Spec.
If I want to generated a pdf file from the spec layout and send by email in attachment, how can I achieve that?
Now I have problem with the script to generate pdf form selected layout. How can I achieve this?
Now I have a new error code
"The specified table can not be found" for table Spec.
What may lead to this error?
The absence of a table occurrence named "spec" in Manage | Database | Relationships would explain this error message.
Like many other places in the program, this reference to a "table" really refers to the "boxes"--called table occurrences--found on the relationships tab. If You delete or rename the occurrence for your "spec" table, you will not be able to use Spec:: as the table occurrence name.
One tip to be sure your TableOccurrence::FieldName syntax is correct for a calculation is to add the fields to your expression by double clicking them from the list of fields just above the box where you enter a calculation.
Thank you Phil! I get rid of the error now.
While there is another problem, I have dozens of fields on Table Spec, and I only need few fields listed above to generate as PDF. I set a new layout for the listed fields, but the script to generate PDF follows table and relationship in database.
The PDF I generated now only showes the Leading Grand Summary part of the whole layout, and why is that?
How did you design your layout? (You can upload a screen shot of it captured while it is in layout mode)
What options did you specify for your save as PDF step? (Current record? Records Being Browsed?)
If you have sub summary layout parts, did you sort your records correctly before saving as PDF?
As a test, you might want to add steps that enter preview mode and pause the script just before the save as PDF step. What you see on the screen should be what you'll get as a PDF if you use the Records being browsed option.
If that still doesn't work for you, you may need to post the exact script that you have created.
To post a script to the forum:
- You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
- If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)
I think I got this problem, I used Go to related record and selected the layout I need based on table Spec.
Thank you very much for your thorough explain! I'm still greenhand with FMP, you really helped me a lot with my learning.
Thank you again!