Jump to content
Sign in to follow this  
titanium

mark record as printed

Recommended Posts

Hi,

please forgive me if this has been explained already.

I have a layout setup to add data, another is the printable version of this. I have the script setup to pull the data into the print friendly layout and display for printing purposes... but i need to add a field which will tell me if this record has already been printed or not.

So, once i hit print, my script triggers, but it should then change the radio button i have setup to "Yes" from the "No" that it would be before printing.

i have attached a PDF of the script as it stands... could somebody point me in the direction to add the required function to this script. The new field i added is called printedYNand have setup and value list with Y and N as the options. This has been placed on the layout as a radio button set.

Thanks so much for insight into this. I will have to adopt this print marking across multiple different layouts... should be fun!

printscript.pdf

Share this post


Link to post
Share on other sites

I played with this much more and found that the answer seems easy... hope im not missing something here... at the start of the script i just put

set field (fieldname) "Y"....

that seems to work, but also seems as bit to simple... any thoughts on if im doing this wrong, or does this seem to make sense.

Thanks.

Share this post


Link to post
Share on other sites

Hey Titanium,

that will work, the only thing you might want to consider is adding an If statement to notify the user if it has already been printed.

Share this post


Link to post
Share on other sites

I find it more useful to store a Date_Printed, and if necessary you could have Date_Reprinted. And if you really care, you could have an entire table of Activities and create an audit trail of each print.

If after you print, you wish to return the user to a layout that prevents editing of the record, a "locked" layout, then you could ask the user "Mark this record as printed, and prevent further editing?" If they answer yes, then set the Date_Printed to Get (CurrentDate) and go to the "locked" layout. (You also should set their priv set to not allow editing of this table if Date_Printed.)

Share this post


Link to post
Share on other sites

thanks very much for the ideas and direction. I like the idea of adding an if statement as well as storing the information as a date rather than a simple Yes/No....

to store the date and date reprinted am i best to do this all in its own table that is just related to the table being used, or should i just add these fields to the current table?

I i use a separate table i could (i think???) write one script for the setting of the date printed and just call it into the printing scripts of each layout that needs it... this sounds like it may be the better approach.

I will give this a try and appreciate any further ideas you can offer. Thanks very much!

Share this post


Link to post
Share on other sites

In working on adding the date printed fields etc, i discovered an issue with my script (i think) that i cant seem to resolve. The script works in that it takes the correct data and goes to the correct layout ready for printing, however, if i click the Print to PDF icon in FM, it prints all records not just the one displayed. So, i must fix this first... when im viewing a record, click print my script runs i then click the FM PDF button, i want ONLY the current record to print... isd this an FM setting, or an issue with my script... ive attached an updated PDF of my script. Thanks for the help, im learning a lot but these little problems seem to give me so much grief.

printBFP.pdf

Share this post


Link to post
Share on other sites

Read about page setup

Link

Share this post


Link to post
Share on other sites

This instructions seem to focus on actually PRINTING a record... i only create PDF for emailing, and do not print directly from FM. Also, and perhaps this is off the mark, but this also talks of finding records... i have attached the original print script which usses FIND but it wont even take me to the current record in new layout, so i then have to flip through the pages until i get to the record that im working on... which is why i switched to the script i attached last. Anyway, i guess i need to figure out how to setup FMs PDF settings...

EDIT: I re-read this whoole topic, then it clicked... add the Export as PDF function into the script rather than ussing the buttons in FM toolbar... i then set to Only Current Record and voila seems to work... I hope im not missing anything here, but i sure do appreciate being able to talk this trough.... sure helps a ton!!!

printbfp_2.pdf

Edited by Guest
brain fart

Share this post


Link to post
Share on other sites

Titanium, are you familiar with Go to Related Record script step? You shouldn't need to Find, and the phrase "takes the correct data and goes to the correct layout ready for printing" rings warning bells.

Printing/PDF, pretty much same thing. Both require Page Setup and a layout optimized for printing.

Share this post


Link to post
Share on other sites

Thanks for your time! I have used the Go To Related Record script... actually was so much easier with much less room for error. I really appreciate all the input i have received... its all helped to solve about 5 issues i was working with on this... The more ideas that come at me, the more it all clicks in.

i have also got working the set print date, and reprint date part of this script. I have put these fields into the table rather than its own table, but think that should work fine. Anyway, Again thanks for all the help... im sure ill be needing more soon!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.