Performing a "Diff" comparison of 2 text fields in FileMaker.

There are lots of ways of doing comparisons of 2 lots of text. Although there isn't anything native in FileMaker to do anything like this. We wanted to do something that did a visual comparison of 2 scripts in BaseElements, so you could see changes before and after when a script was modified.

After some hunting around, we came across some javascript functions that can highlight differences in text within a website, and we've integrated one of them into the webviewer so you can do the same thing inside a FileMaker solution.

This example requires FileMaker Pro 8.5 for the webviewer, but doesn't require any plugins or internet access to work, so is quite a neat way of doing a visual comparison in FileMaker Pro.

The original code for this is from : http://code.google.com/p/google-diff-match-patch/

AttachmentSize
DiffCompare.fp7100 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Performing a DIff

OK. Where is your example? :-)

You should be able to

You should be able to download the attachment now :)

Double quote mark a problem

This is very cool, but when I pasted in a longer document, it only compares up to the first double quote mark (turn off Smart Quotes in FM to be able to type simple double quote). With investigation this turns out to be like a stop character, but only if it occurs in the same position in both the Starting value and Ending value fields! For example, ABC "def" and ABC "def" (ie, exactly the same text) in both input fields will give back ABC alone. If you change the quotes in almost any way, including making them smart quotes, things work as expected. Any ideas of how to get around this limitation, besides the obvious of not using the double quote mark character?

mrdambro, can you send me the

mrdambro, can you send me the example file with your text in it? Send it to support at goya.com.au. I originally thought it might have just been a bug, but I'm guessing it's actually just a quote encoding issue. I'll have a look at it and see if I can sort it out if you'd like.

Cheers,
Nick

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Email addresses will be obfuscated in the page source to reduce the chances of being harvested by spammers.

More information about formatting options