Jump to content

do same thing(s) to every record


Kay
 Share

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

Recommended Posts

I want to do the same thing to every record, and that is to create a related child file with certain fields already populated.

The main file is PROJECTS. The related file is ELEMENTS; they are deliverables for each project. I want to create several standard elements for each project record (e.g. Administration, Production Management). Then... ELEMENTS has a related file called TASKS that are all the tasks required to accomplish an element. So I will do likewise to all elements (create standard tasks) because there are several standard tasks that must be done for each element.

My brain has gotten as far as seeing I should probably write a one-time script that uses a loop but instructions for looping aren't entirely clear. Also, probably a dumb question - can I create child records and set certain fields within the new child records without having the script go to a specific layout - will I have to build a layout to accomplish this one-time deal?

After I get our current data up to date, I will develop a script so that these standard elements and tasks are created everytime a new project record is created. Any help will be greatly appreciated. -- Kay

"Truce is greater than friction."

Link to comment
Share on other sites

You are on the right track. There are a couple of approaches to do this one-time. You could create a looping script that runs a script in ELEMENTS that then runs a script in TASKS. Another possibility is to import the records from PROJECTS into ELEMENTS moving only the key field and then doing a replace to setup the ELEMENT type. If each project had 5 elements, you would need to do this import 5 times, each with a different elements setup. This could be repeated between ELEMENTS and TASKS.

To setup fields using the Set Field script step, the fields don't have to appear on the current layout. To use the Replace script step, copy, paste and insert, the fields must appear on the current layout.

-bd

Link to comment
Share on other sites

Importing records from the parent file was one, fine, brilliant idea! I felt very in control of what I was doing. Once created, I just did a series of quickie Replaces instead of populating through a script -- faster than thinking out the script in this particular case. The whole process was fast even though I had do it a few times for the different standard elements and tasks.

You've earned your paycheque today -- you can go home now! Thanks, Kay

[ September 06, 2001: Message edited by: kattatonic ]

Link to comment
Share on other sites

This topic is 7347 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
 Share

×
×
  • Create New...

Important Information

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