Forum Discussion

ChrisGreen2's avatar
ChrisGreen2
Qrew Member
4 months ago

Using equivalent of SQL IN or CONTAINS for formula

Looking for some Quickbase formula syntax help: 

I need this formula to check for multiple RFC Types:

Original (checking for one value):

([Project Booking Type]="Proposed" and [Opportunity - RFC Type] ="Contract Renewal")

 

Need (something along these lines to include multiple RFC Types:

([Project Booking Type]="Proposed" and [Opportunity - RFC Type] IN ("Contract Renewal",'"Up-Sell/Cross-Sell")

I'll also need a version of this to check for RFC Types NOT IN the values. 



------------------------------
Chris Green
------------------------------

2 Replies

  • If I'm understanding right this might work: 

    [Project Booking Type]="Proposed" and

    (

         [Opportunity - RFC Type] = "Contract Renewal" or

         [Opportunity - RFC Type] = '"Up-Sell/Cross-Sell"

    )

    If you're doing the opposite where it's not those values: 

    [Project Booking Type]="Proposed" and 

    [Opportunity - RFC Type] != "Contract Renewal" and

    [Opportunity - RFC Type] != '"Up-Sell/Cross-Sell"



    ------------------------------
    Chayce Duncan
    ------------------------------
    • ChrisGreen2's avatar
      ChrisGreen2
      Qrew Member

      In the meantime, I think I got it to work like this as well: 

      ([Project Booking Type]="Proposed" and ((Contains(ToText([Opportunity - RFC Type]),"Contract Renewal")) or (Contains(ToText([Opportunity - RFC Type]),"Up-Sell/Cross-Sell"))))


      ([Project Booking Type]="Proposed" and ((not Contains(ToText([Opportunity - RFC Type]),"Contract Renewal")) and (not Contains(ToText([Opportunity - RFC Type]),"Up-Sell/Cross-Sell"))))



      ------------------------------
      Chris Green
      ------------------------------