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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

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