Error in Calculation field calling a multi line text field in another App

Comments

4 comments

  • Rainer Grabowski (FVM)

    Hello Camille,

    the multi line isn't the reason, but it's the wrong syntax of your code.
    Add .join() after All of Peope Notes so that is looks like All of People Notes.join()

    If there is more then one quote "joined" from the People-Notes-Fields in the calculation field you can define a delimiter in the brackets of the .join-term, like `.join("; ") - delimiter is a semicolon plus blank. The default value of .join() is a comma.

    Hope it helps,
    Rainer

    1
    Comment actions Permalink
  • Rainer Grabowski

    Hi James,

    it's not possible to show line breaks or paragraphs in a cell in a markdown table (single line fields don't have line breaks or paragraphs so they work). If you want the content of a multiline text field in a cell you have to remove line breaks and paragraphs first - in the calculation with a regex like:

    @all of field.join().replace(/<\/?[^>]+(>|$)/g, "").replace(/(?:\r\n|\r|\n)/g, "")

    Your table I don't understand. Does Field A always have a value (cause you use it as column header which always will be underlined)?

    Rainer 

    1
    Comment actions Permalink
  • Camille Rousselet

    Thank you very much Rainer, it works perfectly with the .join() !

    0
    Comment actions Permalink
  • James Hertan

    Hi Rainer

    I am trying to display the whole contents of a multi-line text box in one cell of a markup table.
    Even when I use the @all of [field].join() function any paragraphs in the multi-line text box don't appear correctly within the table. If I only use single line text boxes or number fields to generate the tables they work perfectly.

    Any suggestions?  Here is the relationship I am trying to create.

    App 1:
     - Field A
     - Field B
     - Field C
     - etc

    App 2:
     - Only linked to 1 x App 1 item
     - Calc field:
         - If any field in App 1 is not empty, display the heading of that field in Row A, and the content of that field in Row B.

    e.g. (skip any fields that are empty)
    Heading A | Content from field A which is a multi line box
    --- | ---
    Heading B | Content from field B
    Heading D | Content from field D

    Thanks!!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk