Jump to content
Server Maintenance This Week. ×

If statement- need help


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

Recommended Posts

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 6604 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.