October 28, 200520 yr I have one field in a table which has many different values (text) separated by commas and a space. In order to be able to search each value in that field seperately, I need to replace the comma and space with a carriage return. Thus, instead of seeing: Dog, Cat, Rabbit I need to use find/replace to give me: Dog Cat Rabbit Can anyone tell me how to do this?
October 28, 200520 yr You can write a loop script to do this, but if you want to do this only like one time then you can do a simple 'Replace Field Contents' by clicking in the field and then going into the Record Menu. Replace by calculation. Substitute ( TrimAll (FieldA; 1 ; 3 ); ","; ¶)
October 28, 200520 yr Just a note about TrimAll() parameters: The first parameter, trimSpaces, can be 0. You only need to set trimSpaces to 1 when you're dealing with text containing both Roman and CJK characters. "CJK" is Chinese, Korean and Japanese. "Roman" is everything else. The second parameter, trimType, should also be 0 in this case. Setting trimType to 3 will remove ALL spaces in the text. For example, the above formula will take "Rabid Dog, Cat, White Rabbit" and return "RabidDog¶Cat¶WhiteRabbit".
Create an account or sign in to comment