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.

Update the calculation itself from a global field?

Featured Replies

My solution needs quite a few calculations, and sometimes they get really complex. It takes quite a lot of time to

1. Go into the Manage database 

2. Find correct field

3. Go to Options >> Calculated Value

4. Make a change

5. Save and go out of Manage database

6. See if it worked this time

7 Repeat X times until the result is satisfactory 

 

Is there any way to tell the calc field to update the actual calculation from a global field? A Get() function, maybe?

 

Something like 

MakeACalculationBasedOn (global_field)

 

 

Solved by comment

Go to solution

Why do you have the "Do not replace existing value of field (if any)" selected?

  • Author

I mean the actual calculation expression, not the result of it.

I am simply wondering if there exists any technique to let the expression itself be dynamic, so that i might write functions etc in a text field that would then be automatically inserted into the calculation, as part of the calculation.

 

Imagine table with the following fields:

ID

name

description

textField (a text field)

calculationField (a calculation field)

 

In textField, I might write something like:

 

Left(table::name;4) & Case(notEmpty (table::description); table::description) 

 

In calculationField I would somehow (scripting or any other way) be able to make a calculation expression that was exactly what the field textField said.

So I might be able to change the expression in calculationField by changing the content of textField.



@ comment

I knew I had read something like this somewhere :)

 

Thanks

  • Solution

You could also use a global text field for the expression, and a calculation field =

Evaluate ( gExpression )

to show the result. But that would work correctly only in the context of the same table.

  • Author

You could also use a global text field for the expression, and a calculation field =


Evaluate ( gExpression )

to show the result. But that would work correctly only in the context of the same table.

 

This seems to be what i am looking for! I will try to implement Evaluate ( "FieldToEvaluate1" ) into the calculation, and see if it works :)

Hopefully this means that I no longer have to make extremely long Case-statements to get the info I want :)

 

http://www.dwaynewright.com/filemaker-calculations/2007/9/16/filemaker-the-evaluate-function.html

 

EXAMPLE: Let's say we have a text field named Field To Evaluate and it has within it’s expression area Left("Bobby"; 3).

Evaluate (expression) is where we start and we enter the following variations in the expression area.

Evaluate ( "Field To Evaluate1" ) will return Left("Bobby"; 3).

Evaluate ( Field To Evaluate1 ) will return Bob.

  • Author

Evaluate() is exactly what I needed, and more than I hoped for!

 

Thank you so much Comment, you just saved me many hours of work :)

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.