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.

Searching duplicates

Featured Replies

Hi there,

See the attached file. Before performing an entry in the General Ledger, I want to make sure there are no duplicates of the data I am about to transfer there. Please check the Search Duplicates script in the General Ledger file and see what's wrong.

To figure out how the data transfer works, it all starts with the Entry General Ledger script in the Accounts Payable file. See the Blue Book icon on the left-hand side in the same file.

Thanks

Accounting.zip

Well, I think you meant to have "Halt Script" instead of "Exit Script" in the General ledger Search Duplicates script.

But, there are a few potential pitfalls with this routine. Why not just create a relationship between account code and ledger code and check for the existence of related records to avoid dupes?

The issue is:

If [ GeneralLedger::Counter = 1 ]

... you think you only have one record

End If

... but, you are checking only the current record's field named Counter to see if it contains a 1. You should instead use:

If [ Get ( FoundCount ) = 1 ]

because if your found count is greater than 1 then you have a duplicate.

LaRetta

I believe that the the OP considers a 'duplicate' to be a potential duplicate - when a single record already exists with the specified ledger code, not two or more. See the 'Entry General Ledger' script in the accounts file that triggers the find duplicates subscript. So, his original if statement will work (because it is really checking for any records being found at all), but will not stop the original script from completing (because 'Exit Script' is being used instead of 'Halt Script') as is the suggested functionality. Either way, we have demonstrated one of the potential pitfalls of this design - not very intuitive.

Edited by Guest
added script name

Thanks. I confess that I didn't check it very carefully this time; I spotted that If[] test and answered. :crazy2:

And you are right ... not very intuitive.

  • Author

I just replaced the Exit script by Halt and it worked fine.

Thank you guys for the tip!

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.