This is a public Forum  publicRSS

Forum post

    Caysee
    Combining repeating fieldsAnswered
    Forum post posted February 7, 2009 by Caysee, last edited February 9, 2012 
    558 Views, 6 Comments
    Title:
    Combining repeating fields
    Post:

    I have two repeating fields which I want to combine into one. I tried by concatenating but that added repeating field 1 of the first repeating field to repeating field 1 of the second repeating field.

    Does anyone know how to do this simply within the same file?

    Or is the only way to export, use a text editor and import, or use a script (which I can use but I'm not skilled enough to write this one).

    Any help gratefully received. 

    Best Answer

    Caysee

    Thanks Daniele. It works fine.

    You certainly know your FileMaker functions. It took me some time to work out what happens but I got it in the end.

    Cheers 

    Answer

     

    • raybaudi

      Hi Caysee

       

      you can use a repeating calculation field with this calc:

       

      Let(
      values = List ( rep1 ) & ¶ & List ( rep2 );
      GetValue ( values ; Get ( CalculationRepetitionNumber ) )
      )

       

      where rep1 and rep2 are the names of your 2 repeating fields. 

    • Caysee

      Hello Danielle, thank you for your solution (kindly edited by raybaudi) which I will try today. It looks good.

      I'll let you know of results. 

    • Caysee

      Unfortunately it didn't work as I neglected to tell you that I'm still using fp7. I have fp9 but haven't upgraded because of computer issues (which will soon be solved).

      The List function is not implemented in fp7.

      I'll try to figure another way around it because you've given me a good start.

      Thanks

    • raybaudi

      Ok.

       

      Let say that you have 2 repeating fields ( rep1 and rep2 ), each one with 5 reps.

       

      The calculation for a third repeating field of 10 reps will be:

       

      Let(
      n = Get ( CalculationRepetitionNumber );
      Case(
      n ≤ 5 ; rep1 [ n ] ; 
      rep2 [ n - 5 ]
      )
      )

    • Caysee

      Thanks Daniele, I'll give it a try tomorrow as I'm too busy today (Valentines Day!)

      I hope you have a good day. 

    • Caysee

      Thanks Daniele. It works fine.

      You certainly know your FileMaker functions. It took me some time to work out what happens but I got it in the end.

      Cheers