Forum Discussion

StephanieHarris's avatar
StephanieHarris
Qrew Assistant Captain
7 years ago

Not Null

I am writing a formula Rich Text field that is getting a bit complicated.  I am combining 4 text fields together, making the contents bold and italicized. 
Original formula:"<i><b>" & [CT - Q1 Comments] & "<br>" & [CT - Q2 Comments] & "<br>" & [CT - Q3 Comments] & "<br>" & [CT - Q4 Comments]

Then I saw when some of the comments are blank, there was extra space (I assume this is the breaks even though there is no text.  So I feel like I need to adjust the formula to contain nested If/And statements:
If [CT - Q1 Comments] = Blank and [CT - Q2 Comments], [CT - Q3 Comments], [CT - Q4 Comments] are Not Blank then "<i><b>" & [CT - Q2 Comments] & "<br>" & [CT - Q3 Comments] & "<br>" & [CT - Q4 Comments]

I believe this is going to end up being a pretty long formula since I would need to have every variation of each comment being blank.

I believe since these are text fields I would want [CT - Q1 Comments] = null however I don't know how to say [CT - Q2 Comments] Is not null.  I tried the not IsNull( ) but it didn't like that.

Any suggestions?

  • SuryaExpert's avatar
    SuryaExpert
    Qrew Assistant Captain
    Consider using the List command to concatenate text. It ignores the delimiter and the accompanying field if it is null.
    • StephanieHarris's avatar
      StephanieHarris
      Qrew Assistant Captain
      Thank you, I am able to get them together but can't get them on separate lines:

      "<i><b>" & List("\n", [SA - Q1 Comments],[SA - Q2 Comments], [SA - Q3 Comments],[SA - Q4 Comments], [SA - Q5 Comments], [SA - Q6 Comments], [SA - Q7 Comments], [SA - Q8 Comments], [SA - Q9 Comments], [SA - Q10 Comments], [SA - Q11 Comments], [SA - Q12 Comments])
    • StephanieHarris's avatar
      StephanieHarris
      Qrew Assistant Captain
      I was able to get it using "<br>" rather than the "\n
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      The <br> is when you have a Rich Text field type
      The \n is for a regular text field type.