3 Replies Latest reply on Jul 27, 2011 8:48 AM by philmodjunk

    Concatenate text

    AndyHum

      Title

      Concatenate text

      Post

      Looking for help on setting up Concatenate text from multiple fields to a single field.

      I have:

      Field 1 = Material

      Field 2 = Finish

      Normally I would do “Material – “ & Material & ¶ & “Finish – ” & Finish

      The result would be:

      Material – CRS

      Finish – ZINC CLEAR CHROMATE

      But if one of the field has no data, I do not want to show the embedded Text at all.

      I’m thinking use “If” statement with “IsEmpty” but not sure how to construct.

      OS = XP

      FMP server and client =8.0

      Thank you so much in advance!

        • 1. Re: Concatenate text
          philmodjunk

          List ( If ( Not IsEmpty ( Material ) ; “Material – “ & Material ) ; If ( Not IsEmpty ( Finish ) ; “Finish – ” & Finish ) )

          • 2. Re: Concatenate text
            AndyHum

            Thanks Phil, unfortunately we are using FMP 8.01, it does not support "List" function, I will try use the "IF" statement to construct the function, now that I got some idea how it work.

            Thanks for your help!

            • 3. Re: Concatenate text
              philmodjunk

              Sorry about that. I jumped from 5.5 to 10 so I never had a copy of of 8 and thus didn't know that it does not have this function.

              If ( Not IsEmpty ( Material ) ; “Material – “ & Material ) &
              If ( Not ( IsEmpty ( Material ) and IsEmpty ( Finish ) ; ¶ ) &
              If ( Not IsEmpty ( Finish ) ; “Finish – ” & Finish )

              A much messier calculation but one that can be made to work.

              In some cases, you may be able to to stack a series of calculation fields one above the other on your layout and set them to slide up. This only works for printed/previewed/PDF'd output--can't see stuff "slide" in browse mode so you'll have to decide for yourself if that's an option.

              The separate calcualtion fields would look like:

              Field 1: If ( Not IsEmpty ( Material ) ; “Material – “ & Material )
              Field 2: If ( Not IsEmpty ( Finish ) ; “Finish – ” & Finish )

              You might also consider moving this data from dedicated fields to a table of related records where you have one field for the category ("Material", "Finish", etc) and one field for the value. Such records can then be listed in a portal set to slide up | Resize enclosing part or in some cases you can use a list view layout based on the portal with data from your parent record included on this layout.