December 20, 200718 yr 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!
December 20, 200718 yr 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 December 20, 200718 yr by Guest
December 20, 200718 yr 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.
December 20, 200718 yr Author 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?
December 20, 200718 yr 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 --sd
December 20, 200718 yr 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?
December 20, 200718 yr Author Thanks veteran and Lee. Your posts helped me achieve what I was trying to do...
Create an account or sign in to comment