Lookups Fail to Match when a Match Exists

Issue #527 resolved
David Thompson
created an issue

A simple lookup( that should be finding a match returns the default when there is a default parameter, and a "lookup( function failed to match" error when there is none.

I get the same error if I deliberately get the name of the key field or data field wrong, so I can't tell if it is failing to recognize the match when it sees it, or it's not looking in the right field. It might even be looking for the field in the wrong database.

Comments (6)

  1. David Thompson reporter

    I just grabbed a couple of files that were handy, and ran the test in the Formula Workshop, then in a form which I subsequently deleted. When I tried to create a set of demo files just now, the function worked correctly. Then I remembered that the test fields I had originally used both had two word names. The demo files just had the default A and B names. When I changed the names to two word names, it failed in Pan X, and worked in Pan 6. My new demos, with the two word names have been attached.

  2. Jim Rea repo owner

    The lookup( function now works correctly if the key field name contains a space or other unusual punctuation. Fixes issue #527. Thanks to David Thompson making it easy to track this problem down.

    → <<cset aaf25efa5930>>

  3. Jim Rea repo owner

    The lookuplast(, lookupselected(, lookuplastselected( and table( function would not work if there was spaces or other punctuation in the key field name. This was already reported and fixed for the lookup( function, but I didn't notice that the fix was also needed for these other functions. Fixes issue #527.

    → <<cset e32e0e0d4237>>

  4. Log in to comment