dbTalk Databases Forums  

Trigger an Auto-Enter calc when related fields change

comp.databases.filemaker comp.databases.filemaker


Discuss Trigger an Auto-Enter calc when related fields change in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Trigger an Auto-Enter calc when related fields change - 01-07-2010 , 02:10 PM






FMP 9 on Windows: using a trick presented by Howard IIRC, I can trigger
an data field to re-evaluate it's auto-enter calculation with

If ( 1 OR mytriggerfield ; *calculation* ) // no else needed, as 1 is
always true.

And make the auto-enter calc replace existing field data.

Works fine if the trigger field is in the same table. For a classic
sales table, I want a text filed named condition in the order table to
get an auto-enter value when the total of all the amounts of the related
line items changes, i.e. when line items are added or deleted, and when
their amount changes.

Tried various trigger fields: an aggregate field that sums the line item
amounts, the lineItem::amount field, a statistic field in the linetimes
table. The condition field does not even blink.

Solutions, apart from:

Using conditional formatting to highlight the condition field if the
contents seem to be unpropriate

Have the print script check this and ask the user whether he wants to
change the condition field, given the circumstances

Upgrade to FMP 10 and use script triggers (no cando that on this site),
or try plugins

Using a calc field for the condition and an additional text field for
the user to override the default.

Put the possible default conditions in a table and grab the default
condition over a relation (hmmm, would that update?)

I begin to think that some problems should remain unsolved so I can have
more fun with the work arounds.

--
http://clk.ch

Reply With Quote
  #2  
Old   
Lynn Allen
 
Posts: n/a

Default Re: Trigger an Auto-Enter calc when related fields changeX-TraceApproved - 01-07-2010 , 02:25 PM






On 2010-01-07 12:10:45 -0800, clk (AT) tele2 (DOT) ch (Christoph Kaufmann) said:

Quote:
I begin to think that some problems should remain unsolved so I can have
more fun with the work arounds.
That's just sick.
--
Lynn Allen
--
www.semiotics.com
Member FBA
FM 10 Certified Developer

Reply With Quote
  #3  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: Trigger an Auto-Enter calc when related fields change - 01-10-2010 , 10:46 AM



Lynn Allen commented:

[Have fun with workarounds rather than solving problems]
Quote:
That's just sick.
I admit I prefer to solve the problem and I'd use the script triggers
immediately if the site's version was FMP 10 and not 9. Fun or no fun, I
do need to work around. What I've done so far:

a) Used conditional formatting on the condition field with the
calcuatation sum ( LineItems::Amount ) >= 10000

b) Used the print script to check for this amount and prompt to user to
check and maybe change the conditions.
--
http://clk.ch
Me too

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.