Jump 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.

Featured Replies

I can't get anything but a ? to appear in a text field called "Status" with this simple autocalc lookup:

Evaluate("Updated";triggerfield)

When I enter something into triggerfield a "?" appears in the field called "Status". When I change the calculation to say 1+1 I get a 2. Status is definitely a text field expecting a text result. What am I doing wrong? Thanks in advance

Edited by Guest

Hi

chech the function format !

It must be:

Evaluate ( expression {; [field1 ; field2 ;...]} )

So, if the other parameter are correct, it must be entered:

Evaluate("Updated";[color:red][triggerfield[color:red]])

Try:

Evaluate ( Quote ( "Updated" ) ; triggerfield )

It cannot work the way you have it now, because Filemaker is trying to evaluate the formula you gave it inside the quotes. For example,

Evaluate ("2+2")

will return 4.

  • Author

Evaluate("updated";triggerfield)

Is "updated" not merely a text constant?. What if I wanted it to calculate as this:

Evaluate(field1&field2;triggerfield)

Shouldn't it just calculate the concatenation? It doesn't. It puts a ? mark in the Status field.

Remember this is in the "Auto Enter" "Specify Calculation" area of the Options of a text field called status.

I want the word "Updated" to show in the status field if the triggerfield has any change made to it.

Is "updated" not merely a text constant?

Yes, it is. And so is "2+2". That's what Evaluate() is all about: it evaluates its input as calculation.

Evaluate(field1&field2;triggerfield)

Shouldn't it just calculate the concatenation?

No. If you want the concatenation, then use plain

field1&field2

Putting the concatenation inside Evaluate() means you want the result of the concatention to be the expression parameter. And again, Evaluate () evaluates expression as a calculation.

If field1 contains "2+", and field2 contains "2", the result will be 4 again.

as always, comment is right !

Try this calc too

Evaluate ( Quote ( "Updated " & Get ( CurrentTimeStamp )) ; [ triggerfield])

BTW I'm learning just now that, if the trigger field is only one, the function doesn't need square brackets !

This is from FM help on line:

Evaluate(TextField;[Amount]) returns .80 when TextField contains .08 * Amount and the Amount field contains 10.00.

It is not even necessary to use Evaluate() here. Any reference to the trigger field will cause the calc to re-evaluate when the trigger field is modified:

Let (

trigger = triggerfield

;

"Updated"

)

will accomplish the same thing, and IMHO is much clearer.

  • Author

Yes that's done it. That seems to make whatever I try work with the evaluate function. thanks

Create an account or sign in to comment

Important Information

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

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.