Removing "undefined" from markdown table in a calculation field

Comments

3 comments

  • Rainer Grabowski

    Hi Richard,

    I assume you have 
    .join("\n") in your table calculation . 
    Add
    .replace(/undefined/g,"-")
    right behind .join("\n")

    Rainer

    0
    Comment actions Permalink
  • Richard Hedger

    That did the job - thanks.

     

    A little bit on the same theme, is there a way to not display the column titles is there is nothing to display? In other words, the field is empty.

    0
    Comment actions Permalink
  • Rainer Grabowski

    Declare the table as a variable: 

    var table = 'date |  etc (all the code for the table)

    and then: 

    lines == "" ? "" : table

    Rainer

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk