4 Replies Latest reply: May 17, 2017 9:26 AM by Claudio Bueno RSS

    Separate string into two fields with delimiter

    Claudio Bueno

      Hi guys,

       

      I'm trying to separate a field into 2 different fields where my delimiter is '-' although there are a bunch of them on the text.

      I tryied the SubField function but it gets only the string before the next delimiter. For eg.

       

      My text is (delimiter in bold red):

      G820 - CNHi Comercio de Pecas Ltda-TRADE RECEIVABLES NACIONAL-ALL PC-ALL TP-GRP----0L--

       

      Trying to get:

      G820 - CNHi Comercio de Pecas Ltda

      and

      TRADE RECEIVABLES NACIONAL-ALL PC-ALL TP-GRP


      SubField(Myfield,3) gets only 'TRADE RECEIVABLES NACIONAL'


      Note that the first bit of the string and the last vary, so I cannot use the Index function searching for a string.


      Thanks!