Jump to content

How to view Repeating Values in a merge field


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

Recommended Posts

  • 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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 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!

Link to comment
Share on other sites

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!"

Link to comment
Share on other sites

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?
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 6992 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
×
×
  • Create New...

Important Information

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