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

Not sure how to go about this one. I would like to set up a script attached to a button that will go to the layout "Terminated" then only display the people who are terminated. It is a value list (Active,Inactive,Terminated)

I don't think there is much to this one, im sure it's some kind of flag or somthing that will look at the value list and then decide etc. I will continue trying to get this to work, and checking here with a solution lol.

Thanks much, Cheers.

When you say "it is a value list" I think you really mean "it is a field based on a value list". If people are represented by records then, all you need to do is perform a find for records where the field=terminated and then switch layouts.

Enter Find Mode

Set field, myValueListField, "Terminated"

Perorm Find

Go to layout, Terminated

Are you some kind of Terminator, do you actally TERMINATE PEOPLE?

  • Author

I just have to build the applications that terminate people. Someone else has been appointed "The Terminator"

wink.gif

  • Author

Here is how the script looks, it seems to sit on find and wont set field to "Terminated"

Enter Find Mode [Restore,Pause]

Set Field ["active_inactive = "Terminated""]

Perform Find [Restore]

Go to Layout ["Terminated List"]

active_inactive is a field with the value list attached to it.

Runing FMP 5.5, WIndows XP Pro

Remove the Restore from the script

  • Author

I was unable to get the "Set Field" to work, it kept asking for data to be entered into that field. So here is the way I resolved the script.

Go to Layout ["Terminated List"]

Enter Find Mode []

Insert Text [select, "active_inactive", "Terminated"]

Perform Find []

Go to Layout ["Terminated List"]

I probably don't need the last step, but this script worked like a charm. Thanks for pointing me in the right direction.

Hi dunwitch,

First, you are correct that you don't need the last go to layout.

The insert works, you could also create a global field and Set Field using the global. This adds flexibility to the find, as you could then select other status's and use them to.

The enclosed attachment shows how you could implement it.

HTH

Lee

DunwitchSample.fp5.zip

Hi,

as your status field seems to be plain text (not unstored calc), you could use a relationship to solve this quicker.

All you need is a global field, attach a value list (checkbox for multiple parameters, simple list for one criteria) and a self-relationship B)

Selfjoin= "your global field"::"your status field".

Then you could have that list displayed in a portal, or use a script :

Go to related records (Selfjoin - show only -)

Go to Layout.

  • Author

Thanks guy. Everything helps to make this scripting a little less confusing. Then we get into the nested IF statments lol.

Cheers

--

Dunwitch

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.