Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7273 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm having a problem using 'Evaluate' function to auto-enter data into a field.

I'd like the Evaluate to be trigger'ed whenever a field changes in the current record. This trigger field is a calculated field. Its calculation is unstored and simply is a value in a related record in a different table.

The evaluate doesn't seem to be getting triggered when the calculated field gets updated and I'm wondering if anyone out there has any advice on work-arounds etc. The issue seems to be that the calculation is based on a related record I can get it to work on a (unstored) calculated field so long as the calculation is based only on other values in the current table.

My ultimate goal in this is to be able to auto-enter values when the related record changes, but allow the user to override this as needed.

Posted

You should post a mockup of your calc so others can see your context. I've done something simililar to what you are implying and it works for me. I'm not sure why you need the Evaluate function though. Nor am I sure why you need an intermediate unstored calc to get a value from a related table. Why do you not just get the values, or reference them directly in your calc?

Like this

AutoEnterField = "Auto Enter By Calculation, Replace Existing Contents"

Case( [calc to test existing contents of AutoEnterField] and [related table calc] ; [primary result] ; AutoEnterField )

If you are not familiar with this technique it preserves the contents of the field unless a set of rules are met that can even reference the fields current contents.

Posted

The idea is that when field A is updated in table A, it should automatically update any existing related records in table B. However, the user should also be able to override the update afterwards, so I don't want to use a calculation.

The technique you are describing would, I assume, not update a related record in table B when table A was updated, but would only work when the new record was created in table B.

Attaching a reduced test case.

In order for the 'evaluate' function to work it states that the trigger field must change in the same record, which is why I have the calc field in table B as the trigger, instead of just using table A.

Basically, what I am trying to get is some type of 'trigger' functionality based on a foreign key. It looks like the only way to do this though is going to be through some kind of user-initiated action as the trigger with a script.

Posted

thanks. I may look into that plugin, seems like it could be generally helpful to do a number of event handling issues that I have with FM.

Posted

Oh, it is, it is! smile.gif

My best use for it so far is in an auto-enter calculation that triggers a script which performs standard formatting on some things and asks the user about others depending on the degree to which what they've entered differs from standard. The script triggers when the user either clicks or tabs out of the field, rather than waiting until record changes are committed.

In another solution, the trigger launches a script which asks for an invoice number to be entered when a transaction is of a certain type (payment), and then marks the selected invoice number as paid.

This topic is 7273 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.