• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

Automatically updating a field in filemaker

I am creating a subscriptions letter and I need it so that when a letter is printed the entry notes field is updated. I don't want the content in the field erased I just want it added to with something like a line break and then
"22/5/09 six month expiry letter sent."

Is this possible?
  • 2
  • 2
1 Solution
I don't think there is a on printed trigger, so the print process is something you will have to script.  A sample script might look like this:

Print  [ Restore; No dialog ]
#Now loop through each of the found set and update the notes.
Go to Record/Request/Page [ First ]
Set Field [ table::column; table::column & ¶ & "22/5/09 six month expiry letter sent." ]
Commit Records/Requests [ No dialog ]
Go to Record/Request/Page [ Next; Exit after last ]
End Loop

Open in new window

jonathan-dunstansAuthor Commented:
Well I would just run it after it has printed as I already have that bit working see code.

In your code am I right in thinking in Set Field the first table::column announces where the information should go and the second gets the information and adds it into the field with the additional in also.

I guess to get the current date as opposed to a recurring 22/5/09 I would just put // as usual?
Constrain Found Set [Restore] //deletes people we don't want the letter sent to
Go to layout["letter"](subscribers)
Print Setup
code to enter text into notes field goes here
perform find [restore]

Open in new window

Yes.  The "Set Field" script step accepts two parameters.  1) the field you want to set, 2) the value you are setting it to.  

#2 can be a calculation and in that calculation you can do what you need to add the new comments to the existing comments.  That calc may look a little more like this:
subscribers::notes & ¶ & Get ( CurrentDate ) & " six month expiry letter sent."

Open in new window

jonathan-dunstansAuthor Commented:
Thanks it is working fine and dandy now, I really didn't have a clue.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now