February 23, 200520 yr Newbies I'm wondering if anyone has a solution to a very simple problem. I am trying to make a basic address label. The problem is my First & Last name fields have four repeating values. The merge field only displays the first of my repeating values. Is there a way I can specify which repeating value I want to be displayed? Any help would be greatly appreciated!
February 23, 200520 yr Not in 5, unfortunately. You would have to split the repeating field into four separate fields, each that extracts a particular repetition. In 7 you can use the <<repfield[X]>> syntax, which is nice.
February 24, 200520 yr The solution to your probem is a proper redesign - get rid of the repeating fields.
February 24, 200520 yr You didn't mention the design consideration for the repeats or what they contain, so it's not determinable whether or not the repeating fields are proper design or not. If you need to keep them as repeats, one solution is to create additional calc fields with GetRepetition(name,1), GetRepetition(name,2), etc, In fact, depending on what you happen to have in your repeats, you could even use the calc field to do front end formatting for your labels, such as correcting for capitalization.
February 24, 200520 yr Create one global field Num. Then create calculation field Choosing_Name=Case(Num=1,GetRepetition(name,1),num=2,GetRepetition(name,2).............) So, if you change your global field Num, will change the Choosing_name too
February 24, 200520 yr Well, GetRepetition( name, Num ) would be more efficient in that case. But that doesn't help display multiple repetitions simultaneously. Hard-coding Num is more appropriate, as Leader suggested.
February 25, 200520 yr Author Newbies Thanks so much for all your help. I originally defined the first and last names as repeating fields because I would like to be able to search by first or last name without having to run four different searches for 4 different sets of fields. I will try some of the above suggestions and see if I can make the fix. Thank You!
February 25, 200520 yr I originally defined the first and last names as repeating fields because I would like to be able to search by first or last name without having to run four different searches for 4 different sets of fields. Yikes! Keep your First and Last Name fields separate. Use a calc to combine them, as needed: Name First (text) Name Last (text) Name First_Last (calculation, text result) = Name First & " " & Name Last Name Last_First (calculation, text result) = Name Last & ", " & Name First Then enter search criteria in the Name First_Last field. With separate fields, you can be more precise with your field placement (including merge fields.) As Bruce said, "get rid of the repeating fields!"
February 26, 200520 yr I originally defined the first and last names as repeating fields because I would like to be able to search by first or last name without having to run four different searches for 4 different sets of fields. I will try some of the above suggestions and see if I can make the fix. Thank You! Yikes indeed, Time to learn basic data relationship concepts and set up a portal. And also describe more of what you are doing. What do these four names represent? What happens if you need a fifth?
February 26, 200520 yr Well, we can't flog the guy for knowing that repeats are searchable across boundaries (which some people don't). It's just not a 'best practice' use of repeats. To sum up, Q, Bruce, Ender, and I believe your solution is ultimately a calc field.
February 27, 200520 yr Maybe you're summing up other peoples recommendations, but mine is still to ditch the repeats.
March 3, 200520 yr Maybe you're summing up other peoples recommendations, but mine is still to ditch the repeats. I am concurring. We are in agreement, and I was recognizing that Bruce (and others) were saying the same thing. To reiterate: Repeats have their proper uses, but (so far) we don't have evidence that this is one of them.
Create an account or sign in to comment