1 Reply Latest reply on Oct 31, 2011 11:56 PM by bumper

    calculation to list field contents if not empty

    kilbot

      Title

      calculation to list field contents if not empty

      Post

      Okay I would like to write a calculation that would look at a field and get it contents followed by a comma and space unless it is empty, whereas I would want it to grab nothing. How could I write this

       

      exampl:

      Field 1            Field 2         Field 3

      apple                                carrot

       

      Calculation would return

      apple, carrot

       

      Thanks

        • 1. Re: calculation to list field contents if not empty
          bumper

          Create a calculation field, result text, unstored, enter the following calculation for as many field as you need. there is a space after the comma

           

          Substitute ( List ( field1; field2; field3; field4 ) ; ¶ ; ", " )

           

          the List creates a return delimited list of the fields that contain data skipping those that are empty, the Substitute function converts the return character to a comma.