For example, I use the following with great success to change text in the field to either differing text or to show as blank, however for the life of me I can’t do it the other way around.
- data.extract(‘Field_1’,0).replace(/\OLD_TXT/g, ‘NEW_TEXT’);
- data.extract(‘Field_1’,0).replace(/\OLD_TXT/g, ‘’);
Example 1 shows how I replace text from the data file to text that I want in its place;
Example 2 shows how I replace text from the data to show nothing, basically “hiding” it.
I’m thinking (hoping!) there’s a special character for “space” or “blank” or am I barking up the wrong tree? I can get around it by changing the raw data however it would be great if I could work it out on how to do it in datamapper!
Thanks in advance,