- Troubleshooting fmTextConverter
Troubleshooting fmTextConverter
The Devil is in the Detail
Having trouble getting fmTextConverter to work.
I can’t input search and replace terms
There’s a couple of problems you can have when trying to input your search and replace terms…
I have a single list of search and replace term pairs
No Problem! Just paste the text into the search field, choose the delimiter it uses (or click the radio button for tab delimited columns) and press the Split Search → Replace
button:
and fmTextConverter will split the text vertically into pairs of search and replace terms
And if you want you can use the button again, now titled Merge Search ← Replace
, to merge the two columns back together again:
The search and replace terms are too long
If the terms are long and lines wrap in the field, it can get difficult to see which search term corresponds to which replace term. In this case use the expand view button <
to show larger fields.
![]() | → | ![]() |
Text is not being found / not converted
Possible causes
- Search is case sensitive -> wrong case
- Are you searching XML text? XML text encoding
- Search term substring problem
Problem: Substrings
Beware substrings! If one search term is a substring of another you may end up not getting the results you expect, because the first search term will be replaced before the second one is applied. For example, if you have a search term abc
and a search term abcd
, then abc
will be replaced first, and the result will not contain abcd
anymore.
Solution: Sort the lines in decreasing length
fmTextConverter has a very simple solution to this problem: Just press the Sort button to sort the search terms in descending order of length. This way, the longest search terms will be applied first, and you will not have any problems with substrings.
Tip: Pressing the Sort button again returns the records to their original sort order.
Encoding special XML characters
The following characters are encoded in XML
Character | XML |
---|---|
& | & |
< | < |
> | > |
" | " |
' | ' |
For example, if you want to replace mine & yours
with 'mine' and 'yours'
in your code, you will need to encode the special characters in both search and replace terms:
- Search term
mine & yours
- Replace term
'mine' and 'yours'
Too much Text is being found and converted
Possible causes
- Search phrase is not specific or long enough, and XML structure words are being matched
Solutions
- Make the search phrase more specific, e.g. by adding more text to the search term.
- Add extra search and replace terms to avoid / fix the problem
The XML is broken
Yes, when working with FileMaker XML code it is possible to break the XML.
ToDo - Example of AT -> RG
.