2 Replies Latest reply on May 5, 2015 6:17 AM by philmodjunk

    IF statement with SUBSTITUTE function

    JohnMaher

      Title

      IF statement with SUBSTITUTE function

      Post

       

       

      I am sure this is a very easy problem to solve but I am still very new to FM so please bear with me. I am trying to create a calculation that will place a specific variable into a field depending on what variables are in two other fields. 

      In the below example I am trying to make the yellow box say something different depending on what is in the blue and red boxes. I think that the best solution would be to use IF statements and SUBSTITUTIONS but I am not sure how to formulate it. 

       

      If [Get (Anesthesia Type) = "MAC"]
          Substitute ( Surgery Type ; [ "Chalazion" ; ""] )
      Else
      [Get (Anesthesia Type) = "Straight Local"]
          Substitute ( Surgery Type ; [ "Chalazion" ; "N/A"] )
      End If

      I thought it would be something like the above but it is just not working. Any help would be appreciated.