Forum Discussion

markefrody's avatar
markefrody
Icon for Post Patron rankPost Patron
8 years ago
Solved

Custom Column Formula - "And" Not Working

Hi guys,

 

I have created a Custom Column wherein I am using multiple "and" in the "if" statement. Here is the "Custom column formula" I am using:

 

if [Fleet]= "Container Dispatch" and
[Contractor]= false and
[Dispatch]= true and
[Arrive] = true and
[Will Call] = true
then "Contractor "
else "Sub contractor " 

 

 

The results are giving me are all "Sub contractor". Not sure if the "and" is working for Custom Columns.

 

Appreciate your kind assistance. 

Best regards,

Mark

  • Hello,

     

    The Syntax to use And the statement is as follows:

     

    If(AND(Condition1,Comdition2), true Statement, False Statement).

     

    Hope it would help you

5 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Icon for Microsoft Employee rankMicrosoft Employee

    What datatypes are the various columns used in the statement?

     

    Are they text? or True/False ?

    • markefrody's avatar
      markefrody
      Icon for Post Patron rankPost Patron

      Hi Phil_Seamark,

       

      Data types as follows

       

      Text:

      if [Fleet]= "Container Dispatch" 

       

      True/False:
      [Contractor]= false
      [Dispatch]= true 
      [Arrive] = true 
      [Will Call] = true

       

      Please let me know if you need further information.

      • Aron_Moore's avatar
        Aron_Moore
        Icon for Solution Specialist rankSolution Specialist

        Works for me. Double check your data type on the boolean columns and make sure they aren't actually coming in as text.

         

  • hthota's avatar
    hthota
    Icon for Resolver III rankResolver III

    Hello,

     

    The Syntax to use And the statement is as follows:

     

    If(AND(Condition1,Comdition2), true Statement, False Statement).

     

    Hope it would help you

    • markefrody's avatar
      markefrody
      Icon for Post Patron rankPost Patron

      Thanks guys. Have checked and it is coming as True/False. I have managed to devise a workaround.