cmcfarling Posted March 10, 2003 Posted March 10, 2003 Here's the goal... I want to be able to place a repeating field in a record multiple times, with each iteration of the repeating field showing a separate repetion of that field. Make sense? Let's say I have a repeating field with five repetitions and it's named Field_A. On my layout I place 5 copies of Field_A. Is there a way to make each copy of the field show a different repetition instead of showing just the first repetition? I also need to be able to enter data into each specific repetition. Basically I need a repeating field that displays 1 repetition, but I need to be able to specify which repetition is displayed. I know that I can make this work with a relational database, but I want to find out if it's possible with a repeating field. Anyone know if this is possible?
Fitch Posted March 10, 2003 Posted March 10, 2003 You could use calculated fields: GetRepetition (repeating
cmcfarling Posted March 10, 2003 Author Posted March 10, 2003 Yes, that would display the contents of the repetition but what about entering data into each repetition? Here is an oversimplified layout of what i'm trying to do. There will be multiple repeating fields. Repetition 1 from each field would be grouped together, repetition 2 from each field would be grouped together, repetition 3 from each field would be grouped together, and so on. Field_A-rep1 Field_B-rep1 Field_C-rep1 Field_A-rep2 Field_B-rep2 Field_C-rep2 Field_A-rep3 Field_B-rep3 Field_C-rep3 Field_A-rep4 Field_B-rep4 Field_C-rep4 Field_A-rep5 Field_B-rep5 Field_C-rep5 I want to be able to click in Field_C-rep5 for example, and alter the contents of repetition # 5 of Field_C. If all fields could be layed out side-by-side, I don't think I'd have a problem. I'd just make a colmn for each field and display the neccessary number of repetitions. Some fields need to be placed above or below others however, as represented in my crude layout above.
Chuck Posted March 12, 2003 Posted March 12, 2003 I don't see a way to do this with only calculations. I can figure a kludge that'll do it with some scripts, but it's a lot of trouble. Before you go to all this trouble, you might consider if a different technique will get the job done for you, perhaps doing away with repeating fields and using separate fields for each repetition. But, if you really want to do this, here's what I came up with. I'm assuming that you want to store data in three repeating fields with five repetitions. You want the value of each repetition to appear separately on the layout and you want the user to be able to click into these separate values and change the value in the correct repetition. Repeating fields are called FieldA, FieldB, and FieldC. Separate fields are calcs set as follows: FieldA1 = GetRepetition( FieldA, 1 ) FieldA2 = GetRepetition( FieldA, 2 ) . . . FieldC5 = GetRepetition( FieldC, 5 ) The result of these calculations should be whatever type the repeating fields are. Create fifteen more plain (non-repeating) fields of the same type, called FieldA1Entry, FieldA2Entry, ... FieldC5Entry. Place the calc fields on the layout as you want them organized. Set them to disallow entry so that the user cannot click into or tab into them. Place the entry fields on the layout below the calc fields. Allow entry into them. Create a script, Edit FieldA1, set to the following: Go to Field [ FieldA1, Select ] Loop
Recommended Posts
This topic is 7998 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