[Dataperf] Recompute a field when a selection is made in a data-linked field?

Tim Rude timrude at hotmail.com
Sat Jul 8 15:54:49 CEST 2017

You don't need a hidden field on the Invoice Line Item panel to hold the 
desired price since that info is readily available through the item link.

Simply set the formula on your 'selling price' field in the Invoice Line 
Item panel to: IF [selling price] = 0 THEN [desired price through the 
item link] else [selling price] ENDIF

Set the 'selling price' field to update on any change. That way when you 
first create the Invoice Line Item record, because the 'selling price' 
is initially zero it auto-updates to the 'desired price'. But then you 
can adjust it to whatever you want (except zero) and it will stick.

Tim Rude

On 7/7/2017 1:00 PM, Dave Britten wrote:
> 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
> Dataperf at dataperfect.nl
> http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf

More information about the Dataperf mailing list