Skip to main content

Record Level Set Override

You might wish to control what data is written into FileMaker on a record-by-record basis by whatever logic your business requires. This section describes an example of that using the Invoice table.

Skipping

Within the LedgerLink Config module are the scripts responsible for Setting data into FileMaker and Getting data from FileMaker to send to QBO. Since we're concerned with the logic for what data is set into FileMaker, we are only concerned with the scripts that end with "Set."

Let's say we do not want to accept certain invoices from QBO. Perhaps any Invoice with a transaction date prior to when  we started using LedgerLink. If we do not add a "skip," then any invoice modified after the last sync will be pulled down from QBO, regardless of its transaction date and written into FileMaker. To avoid this, follow the steps below and let's see how easy it is to add a "skip."

  1. Locate the "Set" script for the Entity
    Customizing LedgerLink's behavior is the job of a config script. So, you'll find those scripts in the LedgerLink CONFIG script folder.

    In our example, we want to control which Invoices are written back to FileMaker. So, we'll open the Invoice :: Field Map :: Set script.

  2. Locate the "skip" section of the script
    Each "Set" script starts with the "skip" section. This is where you'll add the rule for what records are accepted into FileMaker.

    Here's the Invoice :: Field Map Set script before

  3. Add your business logic
    In our example, we want to "skip" any invoices received that have a transaction date before 7/11/2018, regardless of their last modification timestamp.

    As you can see, we're capturing the $TxnDate, transforming it to a FileMaker date and then comparing it to the date we've chosen as our target date. If the test passes, the record will not be written to FileMaker and will be "skipped."