Jump to content

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

Recommended Posts

Posted

I'm printing pre-defined thankyou letters through a script that enters today's date in a field. Today I want to edit my letters and continue using the script and same field (keeping a cumulative record of thankyou letters to individuals). Can I make the new date add rather than write over an existing date? (i.e. As subsequent thankyou letters are mailed to the same person, I will have a record of all dates.)

Thanks.

[ March 25, 2002, 08:12 AM: Message edited by: Maxwell Morlay ]

Posted

You need another field, date_archive. At the appropriate point in you script before the new date is entered, script this:

Insert Calculated Result (date_archive, date_field & "PP") (i.e. carriage return symbol)

Make sure you uncheck the Select Entire Contents box, or you'll overwrite each time. This will keep a running list of your dates, with the most recent being at the bottom, so you'll need a scroll bar to view. If you want the most recent at the top, create a global field ghold_date, and replace the above step with:

Set field (ghold_date, date_archive)- be sure to select entire contents

Insert Calculated Result (date_archive, date_field & "PP")-select entire contents

Insert Calculated Result (date_archive,ghold_date) -uncheck select entire contents

Clear (ghold_date)

Go to Field()

Now my Mum always taught me to write thank you letters by hand...but that's another story

laugh.gif

Posted

Two things you should know to use this technique: 1) The date_archive must be a text field, since date fields can't accept paragraphs, so you'll need to use the DateToText() function; 2) You can put the archive date at the top without using a global field and extra script steps:

Set Field (date_archive, DateToText(date_field) & " par.gif " & date_archive)

Posted

Nice one Fitch! I forgot about date fields not taking the CRs. crazy.gif

And I didn't know that Set Field could be used to add content to a field, and not lose what was there before - thanks!

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