July 17, 200223 yr Ive been struggling with this for some time. Is it possible to insert text, calculation etc automatically into the first empty field of a repeating field? I have found an option to insert into any one of repeating field but not a dynamic one depending on what is already in the repeating field. Thanks
July 18, 200223 yr First, I would strongly suggest you dump the repeating field approach to whatever you are doing. There are better ways to do 99.99% of the things the typical user does with repeating field. A repeating continer field to store colors is the only use I ever make of repeating field. Otherwise, if you insist, you will need to test each repeat with If(IsEmpty(GetRepetition(RepField,1))) . . . If(IsEmpty(GetRepetition(RepField,2) . . . If(IsEmpty(GetRepetition(RepField,3) for as many repetitions as you have to find the first empty repetition. There is no automatic way to do what you wish. -bd
July 18, 200223 yr Author Oak, Im interested to see what you think is wrong with repeating fields, I have found them really useful - saving on a zillion normal fields What i am trying to do is
July 18, 200223 yr if i'm right you want to record the timings of a job each day? if so sounds like your doing something similar to me. what i have done is created another db. and every timed event for each job creates a new record in the other db. done with a relationship - related by a unique id field and then the other fields in the 2nd db lookup the required results in the main db. don't need to create loads of fields or create annoying calculations for repeating fields. and each individual timed event has its own record. hope this helps, ricardo.
July 18, 200223 yr The problems with repeating fields are many. They are a hold over from the flat file FM days. The problem you will have with putting each days time entries into multiple repeats in repeating fields is sorting and summarizing data stored in the repeating elements. Say each repeat is a different time increment for a different task or project. Now try to sorting and summarizing by project. Can't do it. The data is trapped in the repeating field. Also there is no way to select a single repetition using a loop variable. Each selection of a repeat must be defined explicitly or use a tab order. Also, what happens if you have a repeating field with N repeats and happen to have N + 1 time card entries for that day. If a change in data requires a change in structure, it's generally a bad design. If you have not written the reporting part of your files yet, please consider this before you continue to use repeating fields. I'll also be that you are not very familiar with the relational features of FM. Often those using repeating fields are not. It's the old "When you are a hammer, everythings a nail" limitation on the FM techniques used. You don't need 365 fields. this is "flat file" thinking. What you need is a related transaction file. Again, more data should not change the structure of your file. -bd
Create an account or sign in to comment