Jump to content
Sign in to follow this  

add record do contactLog of each found record

Recommended Posts

hi there!

in my db solution we have a layout displaying data from a contact table (address, name, etc.) and form the contactLog table.

what I need is the following:

I'm doing a find within the contacts and then I want to add a new record to the contactLog of each of the found contacts with the exactly same content.

example: I'm putting together to print their address labels out for a mailing. I want to add to the Log of each of these contacts that Mailing x on day y was made.

How can i make it easy for my db users to do this?

Thanks for your help


Share this post

Link to post
Share on other sites

There are few ways that you can get away with this.

One is to make a looping script that starts on the first records of your found set, either declared that message as a global variable or passes it as a parameter, performs a sub script that adds a related record in the log file with the global/param to the new records. Returns to the original found set, and either omits or moves to the next record, exiting after last. This can be a little sloppy because you could get some screen flickering if you don't control the windows properly.

Another, smarter way could be to create a couple of variables in the Contact file;

-one that holds the Primary Key ID #'s of the entire found set as a List, using something like the List or ValueList() function.

-the other holds the message.

Go to the other log file, and use the same logical looping script there, with each iteration setting the first, or last id to the F_key and making the list smaller by one.

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.