Manipulating fields with spaces

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Manipulating fields with spaces

  • Creator
    Topic
  • #55373
    Carl Duff
    Participant

    I am trying to copy a field in my xlate without success. I am sure I am confusing the list/string commands.

    Input field is “BA01BLUE ADVANTAGE”

    Output needs to be “BLUE ADVANTAGE”

    I can get “BA01” or “BLUE” but not “BLUE ADVANTAGE”

    Ideas please?

    Many thanks,

    Carl

Viewing 2 reply threads
  • Author
    Replies
    • #85107
      Jim Kosloskey
      Participant

      If you are on a later release of Cloverleaf (6.1.1 for sure and later), there is a STRING Action.

      If then you are sure you always want the fifth character to the end if the field, then the Substring function of the String Action with the arguments ‘4 end’ should give you what you want.

      If, on the other hand your release does not have the STRING Action then you will need some Tcl.

      I have a reusable Tcl xltp type proc which will extract a piece of a field. The proc is argument driven (just like the STRING Action Substring function) and you would provide the same start and end arguments.

      If you would like this proc, email me.

      If I am not understanding the issue, please clarify.

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

    • #85108
      Charlie Bursell
      Participant

      What field?  Did you check maximum field length?

    • #85109
      Carl Duff
      Participant

      This was the IN1.2 and.3 fields. The vendor concatenates the insurance ID and insurance name together. The field length was adequate but the developer’s knowledge wasn’t.  ðŸ˜€

      The ‘string’ action did the trick. Thanks to both for responding.

      Carl

Viewing 2 reply threads
  • 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