Forum Discussion

AdamKeever1's avatar
AdamKeever1
Qrew Commander
6 years ago

combine fields using formula rich text

I have three fields I would like to combine using formula rich text.

I would like to take the first, a formula text field, and have it show above the second, a formula rich text showing an icon, and have that show above the third, a formula numeric field.

I am not sure how to structure the HTML for this. Does anyone have any suggestions?
  • try this

    List("<br>",
    [a formula text field],
    [formula rich text showing an icon],
    ToText([formula numeric field]))




    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander
      Works like a charm. Thanks Mark! Do you happen to know how to format so that all three are centered together?
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      I do realize now how I can get rid of the extra leading spaces in front of the first email. I can post that later.

      But I�m not understanding what you mean by all three center together. Do you mean all three separate emails but what do you mean by centered.
    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander
      Here is what the result looks like:



      I would like to have these fields all centered instead of left justified.
  • <div align=\"center\">"

    &

    List("<br>",
    [a formula text field],
    [formula rich text showing an icon],
    ToText([formula numeric field]))
    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander


      This looks so much better now! Thanks again Mark.
    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander
      I modified this slightly to achieve the following result:



      Now I am trying to line several of these up in an additional formula rich text field with this formula:

      List(" ",
      [Overall_combo] , [Back_combo] , [Neck_combo] , [L Shoulder_combo] , [R Shoulder_combo] , [L Elbow_combo] , [R Elbow_combo] , [L Wrist_combo] , [R Wrist_combo])

      For some reason, they are displayed stacked one on top of the other like a totem pole:



      Any idea how I can get these to display in line horizontally?

    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      What is happening is that the field is getting wrapped - maybe because its on a report and Quick Base is  trying to fit the columns across the page without side to side scrolling,

      You can do this

      List "_", etc



      to avoid the wrapping, but the "look" might bother you and also it will still try to wrap a double word like

      R Elbow

      What happens on a report if you take away a bunch of columns off the report so this field has lots of room.


  • Just to put things in context, here was the end goal that I was aiming for:



    This is all compiled into one rich text field so it will always display proportionately and it is composed of other formulas that change the number for the risk rating and the icon associated with the rating. Ergonomics and risk assessment scores are helpful, but a visual is worth a thousand words.

    Here was the final code for the rich text field:

    "\n<table style=width:100%>
    \n<tr>
    \n<td colspan=\"7\"> " & [Overall_combo] & "</td>\n
    </tr>\n
    \n<tr>
    \n<td  " & [L Wrist_combo] & "</td>\n
    \n<td  " & [L Elbow_combo] & "</td>\n
    \n<td  " & [L Shoulder_combo] & "</td>\n
    \n<td  " & [Neck_combo] & "</td>\n
    \n<td  " & [R Shoulder_combo] & "</td>\n
    \n<td  " & [R Elbow_combo] & "</td>\n
    \n<td  " & [R Wrist_combo] & "</td>\n
    </tr>\n
    \n<tr>
    \n<td colspan=\"7\">\n<img src =\"h t t p s://XXXX.quickbase.com/up/XXXX/g/rb/eg/va/5%20Joints.jpg\"height=200; >\n</td>\n
    </tr>\n
    \n<tr>
    \n<td colspan=\"7\"> " & [Back_combo]  & "</td>\n
    </tr>\n
    </table>\n"  
  • Thanks guys. The people in the community have been so helpful, I want to offer something in return when I can.