dunwitch Posted April 17, 2003 Posted April 17, 2003 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.
jasonwood Posted April 17, 2003 Posted April 17, 2003 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
cjaeger Posted April 17, 2003 Posted April 17, 2003 Are you some kind of Terminator, do you actally TERMINATE PEOPLE?
dunwitch Posted April 17, 2003 Author Posted April 17, 2003 I just have to build the applications that terminate people. Someone else has been appointed "The Terminator"
dunwitch Posted April 17, 2003 Author Posted April 17, 2003 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
dunwitch Posted April 17, 2003 Author Posted April 17, 2003 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.
Lee Smith Posted April 17, 2003 Posted April 17, 2003 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
Ugo DI LUCA Posted April 18, 2003 Posted April 18, 2003 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 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.
dunwitch Posted April 18, 2003 Author Posted April 18, 2003 Thanks guy. Everything helps to make this scripting a little less confusing. Then we get into the nested IF statments lol. Cheers -- Dunwitch
Recommended Posts
This topic is 7894 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 accountSign in
Already have an account? Sign in here.
Sign In Now