Forum Discussion

RothHensley's avatar
RothHensley
Qrew Trainee
7 years ago

test for string checkbox

If([Accounting Solution]=Left("QB Online", 9), true)

Why doesn't this formula check the box in a Formula Checkbox field?  [Accounting Solution] is multiple choice text field containing entries such as:  QB Online Essentials, QB Online Plus, etc.
  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain

    YOu have not finished the formula:

    If([Accounting Solution]=Left("QB Online", 9),true,false)

  • If you want the box to be checked if the value in the Accounting Solution field is "QB Online", this should work:
    If([Accounting Solution]="QB Online", true)
  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain

    if(

    left([Accounting Solution],9)="QB Online",true,false)

    Right, you probably don't need the 9.

    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      You probably don't need the If(). Try this:

      [Accounting Solution] = "QB Online"
    • ChrisChris's avatar
      ChrisChris
      Qrew Assistant Captain
      That's what I was going to suggest but it's not intuitive.
    • DanLadner1's avatar
      DanLadner1
      Qrew Trainee
      This just blew my mind a little. I did not know you could omit the If().
  • Contains([Accounting Solution],"QB Online") 

    suggested by Kevin Martens also works.  Thanks for this discussion.  Very helpful!