Simple IF statement

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Simple IF statement

  • Creator
    Topic
  • #51837
    Mark Perschbacher
    Participant

      I know there has to be a way to do this.  I just can’t find it in previous posts.  I want to create an IF action that says if PID-19 equals 999-99-9999 or 000-00-0000, null it out.  I have the action written like this, but its not firing based on the second argument being true.  Anybody have this working?

      1(0).0(0).PID(0).#19(0) eq =000-00-0000 || 1(0).0(0).PID(0).#19(0) eq =999-99-9999

    Viewing 4 reply threads
    • Author
      Replies
      • #71932
        Jim Kosloskey
        Participant

          Mark,

          Have you tried populating a temp variable with the 000-00-0000 and another temp variable with the value 999-99-9999 then using the temp variables in the IF?

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #71933
          Mark Perschbacher
          Participant

            Well, I tried using the variables, but it still didn’t work.  When I put the actual string back in it did.  Not sure what happened, but its working.

            Thanks for your unput.

          • #71934
            Keith McLeod
            Participant

              I have found in several cases that I have to recreate the IF statement in order for it to work.  No changes to the logic necessarily.  This especially occurs when I copy the IF statement.  I will generally add an echo statement within the logic to validate that it works.  If it should have worked but didn’t, I then recreate it from scratch.

            • #71935
              Kevin Crist
              Participant

                i could be wrong, which happens often, but i was under the impression that if you are evaluating a numeric in an IF statement in an Xlate you need to use “==”.

                1(0).0(0).PID(0).#19(0) == =000-00-0000 || 1(0).0(0).PID(0).#19(0) == =999-99-9999

              • #71936
                Jim Kosloskey
                Participant

                  Kevin,

                  I think the imbedded dashes make that a string. Moreover, in Cloverleaf, I believe all HL/7 fields are treated as strings

                  email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

              Viewing 4 reply threads
              • The forum ‘Cloverleaf’ is closed to new topics and replies.