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.

calculation for "go to related record" script

Featured Replies

Hi

I would be grateful if you could help me out here. I guess this must be simple but I cannot get around it!

How could I create a script to go a record according to the value in a field?

I would like to be able to move through different layouts, based on value c or value z. So if in field 'type' the value is 'z' I would like to go to layout 2. Otherwise to go to layout 3.

Many thanks!

Edited by Guest

Check out the Go to Related Records script step. Also, take apart some of the sample files that come with FM to see how to build relationships.

  • Author

Thanks for your reply. I know how to build relationships, my problem is that I want to make a calculation for a script that will choose the correct layout based on a value I have given (with another script) in another field.

I have a table with 47 fields, for two different types of objects. I would like to be able to find records from only one type of objects automatically that in field 'x' have the value 'c'.

Could you please use real names instead of abstract examples?

The most straightforward way is a script like this:

If( type = "z")

  Go to layout(2)

Else

  Go to layout(3)

End If

If you're using FM8 as indicated in your profile, you'll have to click a button or select the script from the scripts menu to run the script, or use a plugin such as zippScript if you want to automatically change layouts. In FM10 you can make field data changes trigger scripts without a plugin.

Hi Tom,

...Snip...

use a plugin such as zippScript ... snip

zippScript is no longer available.

Lee

That would be my thought too.

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.