Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Evaluate Trigger

Featured Replies

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.

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.

  • Author

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.

  • Author

Here's the attachment.

  • Author

arrgh, keep messing that up.

tst2.zip

  • Author

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.

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.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.