Forum Discussion

AndrewFry's avatar
AndrewFry
Qrew Assistant Captain
6 years ago

Present field results in columns and rows

I have a formula that checks a number of different summaries to ensure that all "required" fields are completed.

It lists the fields vertically if they are missing data.

However, the list is quite extensive and causes the form/row to be quite long at times.

Is there a way where instead of presenting each item in a single column with X number of rows, I can make the results populate into 2 or 3 columns by X number of rows?

My current formula (truncated) is this:

var text Exceptions =

List("<br>",

If(Trim([Client Name])="","Work Order Missing: Client"),
....
....
....

If([Total # of Assignments Missing Notes]>0,"Assignment Missing: Assignment Notes")
);

If(Trim($Exceptions)<>"","<font color=Blue><b>Below is a list of fields that are missing data to move the Work Order to an Active status:</b><font color=Red><br>"&$Exceptions)

Is there a way where instead of

"<b>",

where the break comes after every comma, I can make it come after every 2nd or 3rd comma?????

Also, kudos to Mark for helping me with the formula!




------------------------------
Andrew
------------------------------
  • You can make a formula field to calculate your warning messages, but use a comma as a separator.

    List(",",
    etc

    OK so now you have a comma separate list of warnings.

    Then you can create say 20 formula varibles like this

    var text WarningOne = Part($Warnings, 1, ",");
    var text WarningTwo = Part($Warnings, 2, ",");
    etc

    Then  you can have a  formula to calculate the warnings, but since you want Rich text, go back to a <br> separator.  The formula below should list the warnings in two columns

    var text WarningsHTML = 
    List("<br>"
    List("," $WarningOne, $WarningTwo)
    List("," $WarningThree, $WarningFour)
    etc
    )

    Then you can say

    If($WarningsHTML <>"", "<font color=red>" & $WarningsHTML)


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------
    • AndrewFry's avatar
      AndrewFry
      Qrew Assistant Captain
      ​I think I understand the concept.
      I create a list of warnings. Do I need to assign a name to that list of warnings to be able to properly reference it?

      I partition those warnings out to various variables, such as WarningOne, WarningTwo, etc.
      Those variables are then listed in the field to create columns and rows.

      The part I am stuck on understanding is, where do I apply my IF statements in your suggestion?

      The warnings are based upon different IF statements, to identify if a field is completed or not.

      Would I simply list out all the IF statements such as:

      var text Warnings=
      List(",",
      If(Trim([Client Name])="","Work Order Missing: Client,"),
      If(Trim([Subdivision Name])="","Work Order Missing: Subdivision"),
      etc,
      etc,
      etc,
      If([Total # of Assignments Missing Notes]>0,"Assignment Missing: Assignment Notes")

      Then do the following (???):

      var text WarningOne = Part($Warnings, 1, ",");
      var text WarningTwo = Part($Warnings, 2, ",");
      etc
      etc
      etc
      var text WarningTwentyfive = Part($Warnings,25,",");

      var text WarningsHTML = 
      List("<br>"
      List("," $WarningOne, $WarningTwo)
      List("," $WarningThree, $WarningFour)
      etc
      etc
      etc
      List(",",$WarningTwentyfour, $WarningTwentyfive)
      )

      If($WarningsHTML <>"", "<font color=red>" & $WarningsHTML)

      Did I understand you correctly?

      As a matter of clarification for me, wouldn't the "List" function need a comma after the delimiter?

      You have it written as: List("," $WarningOne, ........

      Should it be: List(",", $WarningOne, ......

      I keep getting an syntax error indicating a missing or expected comma.


      ------------------------------
      Andrew
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Yes your understanding of what to do is exactly correct and yes, I was missing that comma after the delimiter in the List.  When I answer questions here i don't have the helper of a Syntax editor and I'm trying to go fast :)

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