Matching spaces in Xlate IF operation

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Matching spaces in Xlate IF operation

  • Creator
    Topic
  • #51190
    Troy Morton
    Participant

    I’m trying to test if a field equals “RCC   ” in my Xlate.  That’s RCC followed by three spaces.  However, it doesn’t seem to be matching.  Is there a way I can match this field without TRIMing the spaces before the IF statement?

    Thanks,

Viewing 1 reply thread
  • Author
    Replies
    • #69124
      Jim Kosloskey
      Participant

      Troy,

      Try COPYng the literal to a temp variable, then do the IF against the temp variable instead of the literal directly.

      Let us know if that works.

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

    • #69125
      Troy Morton
      Participant

      Confirmed the matching worked using:

      COPY  

      ={RCC   }   ->   @LocationOncology

      IF

      0(0).PV1.00132.[0] ne =M && 0(0).PV1.00133.[0] ne =@LocationOncology

      So, if you want to match something with spaces in an IF, you must copy the value to a variable first.

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

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10