2 Replies Latest reply on Oct 25, 2013 4:58 PM by Ramon Martinez

    Add new line to tooltip

    John Henry

      I have a tool tip with a field like this

      String: <string>

       

      Is there anyway to create new line breaks in the string so that the string will appear on the next line when I want it?

       

      For example, if the strings value was 'Mary had \n a little lamb \n her fleece was white as wool'. I would like to see a new like when \n is mentioned. Would this work? If not, what can I replace \n with to get a new line in the tooltip

        • 1. Re: Add new line to tooltip
          Tracy Rodgers

          Hi John,

           

          One way to do this would be create a couple of calculated fields. Similar to the following:

           

          left([Phrase],find([Phrase], " \n"))

           

          if contains(mid([Phrase],find([Phrase], " \n")+3), " \n")  then left(mid([Phrase],find([Phrase], " \n")+3), find([Phrase], " \n"))

          else mid([Phrase],find([Phrase], " \n")+3) end

           

          Then, place these two both in your tooltip on separate lines.

           

          -Tracy

          • 2. Re: Add new line to tooltip
            Ramon Martinez

            Hi John,

             

            Create a calculated field based on the string field, in a way that you add CHAR(10) + CHAR(13) to generate the line change in the text.

             

            For instance:

            Left([description],5) +CHAR(10) + CHAR(13) + Right([description],5)

             

            This formula takes the five left characters from description, add a change of line and then add the five right characters from description

             

            You can add that calculated field to Tooltip and done.

             

            Take a look at this example in the attached workbook.

             

            I hope this help you to get the concept and how-to implement it

             

            Best,

            Ramon