Hey Tim,
I often have to resort to that in some situations (especially when
linking on a surrogate key, rather than a composite key). In this
particular case, I was able to create TWO data links, one on Title then
ID, and the other on ID then Title. I set their corresponding target
fields to Title and ID respectively. Then depending on which field
you're linking from, you get the corresponding lookup. This worked okay
in this database, though I recall this technique being problematic in
the context of subgroup lookups (i.e. where the link field is not the
first field in the link's key field list), and isn't really an option
when using a single surrogate key field (numeric record ID).
It would be nice if it were possible to press Up to start linking a
record, then just tab around the panel that opens to search from a
different field/lookup. That would be a good feature to add in version
3.0 if DP ever goes open source. ;)
-Dave Britten
On 7/7/2018 1:16 PM, Tim Rude wrote:
Why not have the link always lookup based on ID? If you've got the
cartridge in hand, presumably the ID is readily available from the
sticker, making the ID the common denominator of what's always
available when posting the invoice entries.
On July 7, 2018 11:55:58 AM CDT, Dave Britten <[email protected]>
wrote:
Greetings all,
I've been racking my brain for a clean way to handle this for the few years
I've been using DP. I've got a database I use for selling old video games at
garage sales and flea markets. It's only got 7 panels, and just three of those
are relevant for this question.
There's a panel for the actual games, with fields such as title (not
necessarily unique - I may have multiple copies) and ID (a short 2-6 character
sticker code that is unique per cartridge).
There's an invoice panel that acts as the invoice header: invoice no.,
total price, etc.
Then there's an invoice lines panel. This has an invoice no. field that
links the lines to an invoice, and also title and ID fields that correspond to
the Games panel via a multi-field data link.
Right now the invoice lines panel is set up to link on title then ID,
meaning if I create a new line item and press up to choose a game, I have to
use the lookup that's defined based on title. But sometimes I (or my wife)
might just scribble the sticker code on the receipt if pressed for time. I'd
like to be able to select either field in the data link and do a lookup based
on the chosen field, so I don't have to first manually go back and find the
title based on ID via other means.
I also have some keep-a-total fields in play to automatically set a "sold"
field on the Games panel record when a game is linked to an invoice line, and also update
the total for the invoice header.
Is there a simple way to have a choice of lookups like that? I recall
experimenting with this in the past and not having much success. (That may have
been with more complex many-to-many scenarios, though. Invoice-line-to-game is
zero-or-one-to-one.)
-Dave Britten
------------------------------------------------------------------------
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf
--
Dave Britten
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf