Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I would like to run a report and of course view in preview mode. I would like the FMP reporting script to save a .PDF of this report into the parent record generating this report. Relationship would be something like this; ParentProjectTable > ChildReportsTable.

If I can avoid it, I would like to NOT save/export a file to desktop and then import. I would just want to save file straight into FMP, this may not be possible? I want to avoid saving to desktop because database will be used by multiple users and they have there own prefs on where they want to save files. Also, I want to avoid the (Can not find file path) notice. I think GOOD scripting can solve these issues, but I am not hip.

How can I do this, any help? THANK YOU as always.

Posted

I figure my questions kinda relates to this one.

I fail to see the connection myself.

I would just want to save file straight into FMP, this may not be possible?

No, it's not possible.

I want to avoid saving to desktop because database will be used by multiple users and they have there own prefs on where they want to save files.

You could use the path to temporary folder. If your script inserts the exported file into a container field, then users do not need to be aware of the file's interim location.

Posted

Sorry on the topic relation. Should I start a new post?

I will build a demo file and try to make this work and share shortly. Thank you for your tips!

Posted

I have built script and I'm using

Set Variable $Path = Get (TemporaryPath)

But I'm getting an error on the Export Records as PDF.

Error says "Can not save "" file on this disk... etc." then of course on the import of file I get error of File <Unknown> can not be found.

I am missing a step or three I'm sure, like setting the name of the file, where do I set the name at?

demo_historic_pdf.fp7.zip

Posted

Yes, you are missing a file name. Try setting the $path variable to =

Get (TemporaryPath) & GetAsNumber ( Get ( CurrentTimeStamp ) ) &  Int ( Random * 10^6 ) & ".pdf"

Posted

Thanks comment! That fixed everything.

The suggestion you gave on the file name seems to be the best bet to create a truly unique id in time!

Tho I would display this file in a portal list and a string of numbers means nothing to the user.

My question is should I keep the file name as you suggested (stamp,random) and create a separate field that display a "readable" name e.g. 4536_QUOTE_Company_2011-12-09.pdf

Or could I get away with naming file like my example?

Also I would need to build a "safeguard" sorta speak, so when report script is ran it ask User "Are you sure you want to create a NEW report? Or would you like to view existing QUOTE?

Script would check if there is an existing QUOTE, if not, then generate new quote. Goal is to prevent excess stored duplicate QUOTEs. Multiple quotes are allowed if quote-report is unique.

Thanks for your help!

Posted (edited)

The file name can be anything (I am guessing you'd want something that can be calculated, otherwise you will need user input).

You don't need a field for this, you can do calculation in the Set Variable[] step.

Edited by comment
Posted

Correct. I do want a calculated naming convention.

I understand I can name file what ever desired in the Set Variable step, I was just wondering if I could get into trouble if I veered from the unique file name like you suggested.

Posted

4-8 pdfs per record, 1,000's of records. Would referencing to the pdf be a better idea?

Posted

The documents are the legal and official business side of the company. Bid Request, Agreements, Purchase Orders, Etc... are important to have on file showing the project has been properly documented. Multiple Agreements may be printed or "filed" as project details evolve. The company needs this history documented.

Agreements, etc are generated from ParentProject and ChildAssignments.

Unless the Assignment has been marked as invoiced, Assignments can be modified. So the first agreement may differ from the second Agreement depending if assignment(s) have been modified.

Posted

Well, from a database perspective, the existence of a file is not the best way to keep track of facts. If an item is finalized, it should have a date in a DateFinalized field - and that determines the item's status regardless of any file being produced (or not) at the same time (not to mention existing or not at a later time).

From a legal point-of-view, I am not sure I would be happy to deposit all my documents into a .fp7 file.

Posted

Thanks!.. Well of course, as always, you are right!

I need to revisit the flow of assignment state and force User to follow protocol.

Basically once Assignment Agreement has been published, not allow further edits.

Question is, how can I handle a Change Order? Because Change Orders are inevitable.

If Agreement has been published and Assignments are no longer editable then a NEW Assignment would have to be created to cancel out and show modification to the original Assignment record. Maybe this is a good method sense the old Assignment would still exist, but is in a canceled state, and show history of previous publishings???

I like the Assignments editable even if an Agreement has been published; to keep the Project from getting too bloated with updated "Change Order" Assignments over minor edits. But I "think" this is a business operations issue, not the database.

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