Forum Discussion

Re: Create Vertical List

You may try to tie that condition in with another. For example if vents = null return windows, else return windows and vents. This would remove vents when vents is blank.

Something like this:
"<span style=\"font-size:11px;\">" &
"<b>" &

var text VerticalList =
(List
("<br />",
If([Formula show fields with data (Vents Quantity)]=null , ToText([Formula show fields with data (Windows Quantity)]), (ToText([Formula show fields with data (Windows Quantity)]), ToText([Formula show fields with data (Vents Quantity)]))),
ToText([Formula show fields with data (Walkdoor Quantity)]),
ToText([Formula show fields with data (Shutters Quantity)]),
ToText([Formula show fields with data (Cupolas Quantity)]),
ToText([Formula show fields with data (walkdoor Options quantity)]),
ToText([Formula show fields with data (Insulation sq ft)])));
If($VerticalList <> "",
""
& $VerticalList)
& "</b>"
& "</span>"

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

3 Replies

  • MikeKlausing's avatar
    MikeKlausing
    Qrew Assistant Captain

    This formula:

    "<span style=\"font-size:11px;\">" &

    "<b>" &

     

    var text VerticalList =

    (List

    ("<br />",

    If([Formula show fields with data (Windows  Quantity)]=null,[Formula show fields with data (Vents Quantity)], ToText([Formula show fields with data (Windows  Quantity)])),

    If([Formula show fields with data (Vents Quantity)]=null, [Formula show fields with data (Walkdoor  Quantity)], ToText([Formula show fields with data (Vents Quantity)])),

    If([Formula show fields with data (Walkdoor  Quantity)]=null, [Formula show fields with data (Shutters  Quantity)], ToText([Formula show fields with data (Walkdoor  Quantity)])),

    If([Formula show fields with data (Shutters  Quantity)]=null, [Formula show fields with data (Cupolas  Quantity)], ToText([Formula show fields with data (Shutters  Quantity)])),

    If([Formula show fields with data (Cupolas  Quantity)]=null,[Formula show fields with data (walkdoor Options quantity)], ToText([Formula show fields with data (Cupolas  Quantity)])),

    If([Formula show fields with data (walkdoor Options quantity)]=null,[Formula show fields with data (Insulation sq ft)], ToText([Formula show fields with data (walkdoor Options quantity)])),

    If([Formula show fields with data (Insulation sq ft)]=null, "",ToText([Formula show fields with data (Insulation sq ft)]))));

     

    If($VerticalList <> "",

    ""

    & $VerticalList)

     

    & "</b>"

    & "</span>"

     

     

     

    Gives me this:

     

    Thank you,
    Mike Klausing

     



    ------Original Message------

    You may try to tie that condition in with another. For example if vents = null return windows, else return windows and vents. This would remove vents when vents is blank.

    Something like this:
    "<span style=\"font-size:11px;\">" &
    "<b>" &

    var text VerticalList =
    (List
    ("<br />",
    If([Formula show fields with data (Vents Quantity)]=null , ToText([Formula show fields with data (Windows Quantity)]), (ToText([Formula show fields with data (Windows Quantity)]), ToText([Formula show fields with data (Vents Quantity)]))),
    ToText([Formula show fields with data (Walkdoor Quantity)]),
    ToText([Formula show fields with data (Shutters Quantity)]),
    ToText([Formula show fields with data (Cupolas Quantity)]),
    ToText([Formula show fields with data (walkdoor Options quantity)]),
    ToText([Formula show fields with data (Insulation sq ft)])));
    If($VerticalList <> "",
    ""
    & $VerticalList)
    & "</b>"
    & "</span>"

    ------------------------------
    Adam Keever
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      you cannot use null to test a text field.

      Yo nee this syntax

      If(Trim([Formula show fields with data (Windows  Quantity)]) = "" 

      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------
      • MikeKlausing's avatar
        MikeKlausing
        Qrew Assistant Captain
        I've been working on this but havent got it to collapse the blank lines as of yet. both of these formulas still dont pick out the blank lines and collapse them.  I have tried these formulas: 

        "<span style=\"font-size:11px;\">" &
        "<b>" &

        var text VerticalList =
        (List
        ("<br />",
        If(Trim([Formula show fields with data (Windows Quantity)])<>"", ToText([Formula show fields with data (Windows Quantity)])),
        If(Trim([Formula show fields with data (Vents Quantity)])<>"", ToText([Formula show fields with data (Vents Quantity)])),
        If(Trim([Formula show fields with data (Walkdoor Quantity)])<>"", ToText([Formula show fields with data (Walkdoor Quantity)]))));

        If($VerticalList <> "",
        ""
        & $VerticalList)

        & "</b>"
        & "</span>"


        And: 

        "<span style=\"font-size:11px;\">" &
        "<b>" &

        var text VerticalList =
        (List
        ("<br />",
        If(Trim([Formula show fields with data (Windows Quantity)])="",ToText ([Formula show fields with data (Vents Quantity)]), ToText([Formula show fields with data (Windows Quantity)])),
        If(Trim([Formula show fields with data (Vents Quantity)])="", ToText([Formula show fields with data (Walkdoor Quantity)]), ToText([Formula show fields with data (Vents Quantity)])),
        If(Trim([Formula show fields with data (Walkdoor Quantity)])="", ToText([Formula show fields with data (Shutters Quantity)]), ToText([Formula show fields with data (Walkdoor Quantity)]))));

        If($VerticalList <> "",
        ""
        & $VerticalList)

        & "</b>"
        & "</span>"



        ------------------------------
        Mike Klausing
        ------------------------------