Skip 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.

If statement- need help

Featured Replies

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

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

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:

  • Author

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

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

  • Author

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.