2 Replies Latest reply: May 15, 2014 9:57 AM by Simon Rear RSS

    Replace String Function??

    Simon Rear



      I have a requirement to create a calulated field with every occurance of a particular character in another field to be replaced with a specified character.


      I understand that  MSRP[/i] would do this globally for the entire data file but is this not possible on a per field basis using an in built function??


      I have checked all string functions and am surprised to find no equivilant of, for example, the VBA  Replace[/i]  function.


      Any help or advice appreciated,




      Simon Rear

        • Replace String Function??
          Dee Moore

          At this point Monarch does not have a function to replace characters. But, there is a way to perform this action.......


          This expression will replace the lower case "u" with an upper case "X" for the following Sample field:


          FIELD_1     -   NEW_FIELD_1


          0u4u6       -    0X4X6      

          22u78       -    22X78      

          uu870       -    XX870      

          8t987       -    8t987      

          575u9       -    575X9      

          u983u       -    X983X      

          ci654       -    ci654      










          Using Copy & Paste, the Expression builds quickly.


          I hope this is helpful.


          Dee Moore

          Datawatch Corporation

          Technical Support & Model Building


          • Replace String Function??
            Simon Rear

            Thanks for the reply Dee,


            I would imagine your suggestion will work ok for small text fields but could reach the maximum expression limit for memo type fields.


            A replace function would be nice, or even better expressions with VBA support! Anything like this in the pipline fopr monarch??