Comments

11 comments

  • Rainer Grabowski

    Hi,

    you can also use markdown syntax for formatting.

    var result =   "**" + @Field +"**" 
    result 
    

    makes the whole result bold. You also wrap substrings or words or whatever you want with asterisks or underscores

    "1.   **bold** with 2 asterisks" + "\n" +
    "1.  __bold__ with 2 underscores " + "\n +
    "1. *italic* with 1 asterisks" + "\n" +
    "1. _italic_ with 1 underscore"
    

    will be shown as:
    1. bold with 2 asterisks
    2. bold with 2 underscores
    3. italic with 1 asterisks
    4. italic with 1 underscore

    Rainer
    rg@delos-consulting

    1
    Comment actions Permalink
  • Hamid

    Hello Martin,
    You can use a javascript method to format or make calculation on your calculation fields.
    For Bold string

    var result = @your_text_field.bold()
    result
    
    

    /Hamid

    0
    Comment actions Permalink
  • Hamid

    For more information look at here : http://www.w3schools.com/js/default.asp

    0
    Comment actions Permalink
  • Andrew Hopkins

    Instead of bold, can it be made a heading?   

    0
    Comment actions Permalink
  • Rainer Grabowski

    Hi Andrew,

    "#  headline" makes a

    headline

    (you can use 1 # to 6 #, H1 - H6). # is one function of the markdown syntax. More about markdown see here https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet

    Rainer

    0
    Comment actions Permalink
  • Andrew Hopkins

    Thanks Rainer,

    I've tried the # for heading, and it's not working as planned.  What I would like to do, is have a calculation that converts a text field to a heading with line under.  It keeps returning the actual field name instead of the text field_80128623  nearest I can get is bold text

    I've tried a number of things, and i just can't get it to work, which is probably my very limited knowledge coming into play, so any help would be appreciated.

    I've tired variations of these and a few others, which work for bold, or as a straight text heading without using the field name - just can't get a heading using the filed name happening though

    var result =   "**" + @Field +"**" 
    result 

    "#@Title111 \n--------------"

     

    This works as a heading with a line break across the page, just can't get the field name in there

    var dummy = @Event Name

    "# EVENT DESCRIPTION AND LOCATION \n--------------"

     

     

     

    0
    Comment actions Permalink
  • Rainer Grabowski

    Hi Andrew,

    if you want to concatenate a string or a number (and # is a string as well as \n ) and a variable (or 2 variables) you have to use the usual syntax:

    "# " + @Title111 + " \n--------------"

    (blank space after #).

    More about calculation basics  see her: https://help.podio.com/hc/en-us/articles/201019358-Calculations

    Rainer

    0
    Comment actions Permalink
  • Andrew Hopkins

    Thanks Rainer - appreciate your help.  

    0
    Comment actions Permalink
  • Adil Tuncer

    Hi Rainer,

    Hope you see this. Can we use markdown tables in calculation fields?

    0
    Comment actions Permalink
  • Hamid

    Hi Adil,

    Try this syntax

    "Title1 | Title2" + "\n" + "--- | ---" + "\n" + @field1 + " | " + @field2
    0
    Comment actions Permalink
  • Adil Tuncer

    Hamid, Thank you.

    It worked. I had not put  "\n" , before. 

    Now, it works. Thank you again.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk