Greetings all,

I've been banging my head against this one for a couple hours now, but a lot of 
reading and experimenting with formula tricks hasn't gotten me anywhere.

Short version: How do I make a field on a panel refresh itself with a value 
from another related panel whenever the selected value in the data-linked field 
changes? This field should NOT be part of the data link key, i.e. I should be 
able to change it afterwards without breaking the link.

Longer version:

I'm making a small sales database for selling some stuff at a flea market later 
this summer. The issue here involves three panels: items, invoices, and invoice 
lines. The items panel has a price field, where I store the sticker price of 
the item. The invoices panel has a panel link to the invoice lines panel. The 
invoice lines panel has an item field, which has a data link back to the items 
panel, allowing for selecting an item. The invoice lines panel also has its own 
price field, because I may sell an item for a price other than what I had 
marked it (it's a flea market, after all).

What I'd like to have happen is when I press F5 on the invoice panel link to 
create an invoice line item, the invoice line's price field gets automatically 
filled when I select a record in the item field using the up arrow. But I need 
the price on the invoice line to be updatable, and I don't want the change to 
cascade back to the items panel or sever the link.

I tried adding a second field (which would eventually be hidden) to the invoice 
lines called "Selected Price", set to calculate as the sticker price of the 
selected item at any change. Then I had the main invoice line price field 
calculate something like this:

IF [Selected Price] <> [Price Field In Items Panel] THEN [Price Field In Items 
Panel] ELSE [Price] ENDIF

That didn't seem to get my anywhere, as I haven't found a way to convince DP to 
compute that field BEFORE computing the value for the "Selected Price" field.

Any ideas? Thanks.

-Dave Britten
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf

Reply via email to