agtjazz Posted March 28, 2006 Posted March 28, 2006 Hello.... I would like to display Active or Inactive on a layout near the name if the active field is Yes, I would like it to display Active and if no, I would want it to show Inactive. I thought that I should do an If statement... but it's not accepting it I have 2 tables (so far)... 1 is People and the other is Dept. In the People table, there is a field that is titled Active with Yes or No populated for the records. here is what I have: If[People::Active = "Yes"; "Active"; "Inactive"] end if But as I type People::Active = "Yes"; "Active"; "Inactive" Filemaker throws up an error saying An operator (e.g. +,-,*,....) is expected here What am I doing wrong? Or is there another way to do what I want? TIA
Lee Smith Posted March 28, 2006 Posted March 28, 2006 Hi Tia, and welcome to the Forum, Try with a case, I think it would work, or this may be as good. Case(People::Active="Yes"; "Active") HTH Lee
LaRetta Posted March 28, 2006 Posted March 28, 2006 Also it doesn't need to be set via script at all. It can be either a standard text field (Auto-Enter, Do Not Replace Existing Value UNCHECKED) or a calculation (text) in your People table. Formula would be: If ( People::Active = "Yes"; "Active"; "Inactive" ) LaRetta :wink2:
agtjazz Posted March 28, 2006 Author Posted March 28, 2006 This may sound like a "no brainer" question... but please be patient --- how do I add a standard text field or a calculation text as suggested above? I have added text- but I can't format the field (since it's not a field in my table).... so i don't know how to get to the options of Auto-Enter, Do Not Replace Existing Value etc. Thanks bunches
Lee Smith Posted March 28, 2006 Posted March 28, 2006 I made you a quick down and dirty demo that shows how to do this via calculation or via a script. Hopefully this will help you. Lee FlagInEight.fp7.zip
agtjazz Posted March 28, 2006 Author Posted March 28, 2006 The demo is extremely helpful and I am impressed at how kind it was of you to help me to this level. I really appreciate it. Hope your day is wonderful! -Pali
Recommended Posts
This topic is 6817 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