Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

find differences if Exact function fails

Featured Replies

  • Newbies

I have a database where I use the exact function to compare text field A to text field B to alert me when they no longer match. I then need to find what the change was. Typically the data in the field is so small that visually finding what is different is very simple. Lately this has not been the case and am now looking for a way to highligh/identify or in some way display what text doesn't match between the two fields.

Does anyone have any ideas or know of a custom function to solve this?

When you say:

... am now looking for a way to highligh/identify or in some way display what text doesn't match between the two fields.

...do you mean that you just want to show which field changed most recently and display what the change was?

An audit log might work well for this.

It would be relatively easy to find the FIRST changed character and hilite either the character or the rest of the text - using a custom function.

I believe it would be incredibly complex to find where the change ends and the text reverts to the original.

  • Author
  • Newbies

I was leaning this route. If I can identify the first character where the two fields become different that would do it.

What would a typical change look like in one field and how would it compare to the other? If the field values always have a fixed number of words or always have values from a list or if some other rule is followed, that could make it relatively easy.

Try this custom function:

HiliteDifference ( original ; duplicate )

Let ( [

origChar = Left ( original ; 1 ) ;

dupChar = Left ( duplicate ; 1 ) ;

pass = Exact ( origChar ; dupChar ) ;

nextOrig = Right ( original ; Length ( original ) - 1 ) ;

nextDup = Right ( duplicate ; Length ( duplicate ) - 1 ) ;

hilite = Case ( Length ( nextOrig ) ≥ Length ( nextDup ) ; origChar & nextOrig ; dupChar & nextDup )

] ;

Case (

pass and Length ( nextOrig ) ;

origChar & HiliteDifference ( nextOrig ; nextDup ) ;

TextColor ( hilite ; RGB ( 230 ; 0 ; 0 ) )

)

)

Note that using TextColor() may fail if for example the difference is a space character at the very end. You might consider using the (free) 24U SimpleHighlight plug-in instead.

---

BTW, just overlaying the two fields one on top of another might be simpler - and a lot faster...

Edited by Guest

  • Author
  • Newbies

Thanks, that works perfectly. Just what I needed.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.