Forum Discussion

MikeKlausing's avatar
MikeKlausing
Qrew Assistant Captain
6 years ago

Formula Rich text nested IF statement List

I am following this thread: https://community.quickbase.com/communities/community-home/digestviewer/viewthread?GroupId=103&MID=35640&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer


In here they were trying to create a horizontal list based on certain criteria being met. I am trying to make a vertical list based on certain conditions being met. I have 5 quantities on a quote form that may or may not have values. I want them to appear stacked on top of each other. Like this:  I am trying to combing Fields 525 528 531 into 1 formula field where there is logic which will collapse fields 528 and 531 if they are blank or null.



Here is my formula:

if
([Minimum Record ID# 1st vents - Quantity] = null,
null,
[Minimum Record ID# 2nd vents - Quantity]=null,
null,
[Minimum Record ID# 3rd vents - Quantity]=null,
null,
[Minimum Record ID# 4th vents - Quantity]=null,
null,
[Minimum Record ID# 5th vents - Quantity]=null,
null,
[Minimum Record ID# 1st vents - Quantity]>0 ,
[Minimum Record ID# 1st vents - Quantity],
[Minimum Record ID# 2nd vents - Quantity]>0,
[Minimum Record ID# 1st vents - Quantity] & "<br>" & [Minimum Record ID# 2nd vents - Quantity],
[Minimum Record ID# 3rd vents - Quantity]>0,
[Minimum Record ID# 1st vents - Quantity] & "<br>" & [Minimum Record ID# 2nd vents - Quantity]& "<br>" &[Minimum Record ID# 3rd vents - Quantity],
[Minimum Record ID# 4th vents - Quantity]>0,
[Minimum Record ID# 1st vents - Quantity] & "<br>" & [Minimum Record ID# 2nd vents - Quantity]& "<br>" &[Minimum Record ID# 3rd vents - Quantity] & "<br>" & [Minimum Record ID# 4th vents - Quantity],
[Minimum Record ID# 5th vents - Quantity]>0,
[Minimum Record ID# 1st vents - Quantity] & "<br>" & [Minimum Record ID# 2nd vents - Quantity]& "<br>" &[Minimum Record ID# 3rd vents - Quantity] & "<br>" & [Minimum Record ID# 4th vents - Quantity] & "<br>" &[Minimum Record ID# 5th vents - Quantity])



------------------------------
Mike Klausing
------------------------------
  • MikeKlausing's avatar
    MikeKlausing
    Qrew Assistant Captain
    I was able to mimic this action by using the following formula on a combined text field: 

    var text CombinedText = ToText([Combined Text Window Size]);

    var text RemoveSpaceAfterSemiColon = SearchAndReplace($CombinedText, "; ",";");

    // substitute new line for semicolon
    SearchAndReplace($RemoveSpaceAfterSemiColon,";","<br>")

    That makes it look like this: 
    This is exactly what I need to do with the original question as well where they have the option of having 4 total items in this list, but if not it doesnt leave blanks.



    I still havent found the proper way to combine the fields  if they are 3 seperate fields entirely.

    ------------------------------
    Mike Klausing
    ------------------------------
  • List("\n",
    and then list all your fields or expressions which might or might not be null
    )


     The list function well concatenate any values Which are not now and in this case the separator will be the new line
    Character.

    The value need to be text values, not numeric values.  


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      If the field is Rich Text Type, then use

      List("<br>", fields comma separated)

      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      markshnier2@gmail.com
      ------------------------------
      • MikeKlausing's avatar
        MikeKlausing
        Qrew Assistant Captain

        That gives me the error: Expecting text but found number.

         

        It does work if I change it to a text field, but I am looking at doing this for both text fields and numeric fields.

         

        Thank you,
        Mike Klausing

         



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

        If the field is Rich Text Type, then use

        List("<br>", fields comma separated)

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        markshnier2@gmail.com
        ------------------------------