TyGuy Posted March 7, 2001 Posted March 7, 2001 I have a set of databases which help to determine the numerous "deliverables and deadlines" for my various team members. In order to accomplish this task I have one dB set up for each area with a number of fields and calculated date fields based on a given target date. In order to make these fields and files functional in the larger relational system, I have a script which creates individual records of each of the fields with area name tags in a separate database. I keep both dBs seperate because the date calculations in the first database are contingent upon each other. The problem is, each time I add or subtract a known "deliverable" I have to go back in and rework the scripts in both databases. Is there no way to access fields as variable names so that I can create a loop that will process all fields no matter how many fields are in a given record? I'm looking for something like this: Set Field "Count"," # of fields" Loop Set Field "newDBField", "oldDBField(Count)" Set Field "Count","Count-1" Exit Script If, Count=0 End Loop This seems like a rather simple and reasonable function - am I missing something, or does anyone have any advice for a workaround in this situation?
BobWeaver Posted March 7, 2001 Posted March 7, 2001 I didn't completely follow your description of your files, but it seems to me that you need to look at the overall structure of your database. If you find that you need to rewrite scripts when you add deliverables, then there is something fundamentally wrong. Are you adding fields when you should really be adding records? Anyway, to answer your question, the only workaround I know of is to use the "Go to Next Field" command in conjunction with the Status(CurrentFieldName) to test the name of the field that you are in. It's messy and should only be used as a last resort. I suggest rethinking the database structure first.
Recommended Posts
This topic is 8667 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 accountSign in
Already have an account? Sign in here.
Sign In Now