Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How to use Merge fields with repeating fields


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

Recommended Posts

Posted

I can't figure this one out easily... I have a repeating field, say it's for people's names and has 5 repetitions.

I want to display them on a layout as a Merge Field... My question has to do with commas, and periods...

If I type: <>, <>, <>, <>, <>. This method will work, but if I only had two names entered in the original field, it would look like this: John Smith, Jane Doe,,,.

My question is how to I get it to display the correct grammar, so to speak. I don't know if there's an easy way or if some sort of calculations need to be devised. Any help or suggestions or demos?

Thanks!

Posted (edited)

Not sure you can do what you are trying to do using Merge Fields, why not do a calculation and Concatenate the data.

Why are you using Repeating Fields?

non repeating fields.

Case (not IsEmpty ( Field1 ) ; Field1 & ", " ) &

Case (not IsEmpty ( Field2 ) ; Field2 & ", " ) &

Case (not IsEmpty ( Field3 ) ; Field3 & ", " ) &

Case (not IsEmpty ( Field4 ) ; Field4

)

for Repeats

Case (not IsEmpty ( GetRepetition ( Field1 ; 1 ) ) ; GetRepetition ( Field1 ; 1 ) & ", " ) &

Case (not IsEmpty ( GetRepetition ( Field1 ; 2 ) ) ; GetRepetition ( Field1 ; 2 ) & ", " ) &

Case (not IsEmpty ( GetRepetition ( Field1 ; 3 ) ) ; GetRepetition ( Field1 ; 3 ) & ", " ) &

Case (not IsEmpty ( GetRepetition ( Field1 ; 4 ) ) ; GetRepetition ( Field1 ; 4 )

)

HTH

Lee

Edited by Guest
Posted

You cannot perform calculations in a layout, so you'll need to add a calculation field for this, e.g.:

Substitute ( List ( Names ) ; ¶ ; ", " )

BTW, a repeating field doesn't seem the proper choice here.

Posted

I'm using repeating fields because the Field is "Author" but there are often more than one author. What else would I use?

There's a Song Title - that's one field...

There's the Author - that's a repeating field (jn case there's more than one)

There's a Percentage - a repeating field similar to author, the percentage represents the percent of each person's authorship.

Example:

Song: "My Great Song #1"

Author(s): John Smith, Jane Doe

Percent: 75%, 25%

Then this data may be presented on a layout like:

"My Great Song #1" written by John Smith (75%) and Jane Doe (25%).

I'm sure this kind of data could also be done with portals and related tables but for something so simple I didn't think it would be necessary to get into all that...

Is there a downside to using repeating fields?

Posted

Is there a downside to using repeating fields?

You bet there is!!!!

"Author" but there are often more than one author. What else would I use

Relationships comes to mind :bang:

--sd

Posted

Is there a downside to using repeating fields?

Yes, there is - your options of going beyond "something so simple" are severely limited. For example, you cannot produce a report of titles by author. I would also assume that there is some further purpose to this, rather than just recording the authorship percentages. If there is revenue to be distributed, how will you calculate it?

This topic is 6187 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.