4 Replies Latest reply: Oct 20, 2011 5:35 AM by Miguel Angel Baeyens de Arce RSS

    combining 3 function (trim(subfield(replace

    Aissam Boumejjane

      Hi Guys,


      I have a field that needs to be extract in to 2 fields.

      I've used subfield function to extract 1 field into 2 fields 'country' and 'imex' then I used the trim function to remove unnessary spaces within the field imex. Now I want to add the replace function to change some fieldvalues. My script now looks:


      if(trim(subfield(Fieldvalue, ',', 2)),


             If(replace(Fieldvalue, 'VL','V'),

             if(replace(Fieldvalue, 'EP', 'E'))))) as imex,



      However this is incorrect. I don't know how to combine these 3 function into one formula. if you combine multiple function, how do you know which one you should use first. In my case, should I start with: the replace function then the trim and subfield? or first the trim(subfield then the replace function?



      Hope u can help!