Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Flag Terminated:


This topic is 7843 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 7843 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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