1. Troubleshooting fmTextConverter
    1. I can’t input search & replace terms
      1. I have a single list of search & replace terms
      2. Search & replace terms too long / wrapping
    2. Text is not being found / not converted
      1. Problem: Substrings
        1. Solution: Sort lines in decreasing length
      2. Encoding special XML characters
    3. Too much text is being found and converted
      1. Solutions
    4. The XML is broken

Troubleshooting fmTextConverter

The Devil is in the Detail

Having trouble getting fmTextConverter to work.

I can’t input search & replace terms

There’s a couple of problems you can have when trying to input your search & replace terms…

I have a single list of search & replace terms

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:

Two columns

and fmTextConverter will split the text vertically into pairs of search & replace terms

Two columns

And if you want you can use the button again, now titled Merge Search ← Replace, to merge the two columns back together again:

Merge two columns

Search & replace terms too long / wrapping

If the terms are too long and the 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 / hide wider fields:

Narrow view [<] / [>] Wide view
Expand View Button ↔︎ Expanded View

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 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.

Sort Button

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
& &amp;
< &lt;
> &gt;
" &quot;
' &apos;

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 & replace terms:

Search term
mine &amp; yours
Replace term
&apos;mine&apos; and &apos;yours&apos;

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 & 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.

Made with ❤️ by MrWatson-de