Discussions

Expand all | Collapse all

Displaying a text value

  • 1.  Displaying a text value

    Posted 14 days ago
    Hello, 
    I have 2 fields that record a reference number
    [Case ID] (key field) and (numeric)
    [Case ID from import] (contains legacy data from an old system).  (numeric)

    I have created a Formula Rich Text field to combine and display these values in a large format at the top of a form.
     
    "<span style='font-size:150%; font-weight:bold'>" &
    If(not IsNull([Item ID From Import]), ToText([Item ID From Import]), ToText([Case ID]))
    & "</span>"

    The Item ID is pulling through but I must be missing something because if there is an [Item ID from Import] I see it but if not I just see a "0", not [Case ID]. 

    I also tried this as 

    "<span style='font-size:150%; font-weight:bold'>" &
    If(not IsNull([Item ID From Import]), ([Item ID From Import]) &
    If(isNull([Item ID from Import]), [Case ID]))
    & "</span>"

    But only the first part seems to work!

    ------------------------------
    Owen Morgan
    ------------------------------


  • 2.  RE: Displaying a text value

    Posted 14 days ago
    Deselect "Treat blank values as "0" in calculations" and try your first solution again.



    ------------------------------
    Adam Keever
    ------------------------------



  • 3.  RE: Displaying a text value

    Posted 13 days ago
    Thanks Adam - this worked with the first formula!

    ------------------------------
    Owen Morgan
    ------------------------------



  • 4.  RE: Displaying a text value

    Posted 13 days ago
    Checking null values for lookup fields is sometimes cheeky and moody.  try doing this.

    If( ([Item ID From Import] +1>=1), ([Item ID From Import]) ,ToText([Case ID]))

    ------------------------------
    Babi Panjikar
    ------------------------------