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

Featured Replies

  • Newbies

I am having trouble writing this if statement. dont know the correct syntax in filemaker

when balance is 50,000 i get nothing as result

If(balance ? 2500, "a","") or

If(balance ? 5000, "b","") or

If(balance ? 50000, "e","")

Hi, here is the syntax to use...

If (balance = 2500, "a" ,

If (balance = 5000, "b" ,

If (balance = 50000, "e" , "")))

Ed.

For this example, you really should use the "Case" function.

I agree with Dan,

I find the case statement a lot easier to write.

Case(balance = 2500, "a",

balance = 5000, "b",

balance = 50000, "e"

)

Lee

cool.gif

I do agree, the case statement would be best. Adydas, if you do want to use the IF statement then use my example above, but as the other 2 posts say you should always favour the case function over the If statement, it has been proved to be the quicker option.

The difference between the two is, the IF function will check every statement even once it has found something to be true. The Case statement stops once it finds the statement which is true.

Ed

One possible problem here: the original question has "?" in the formula (at least on my screen). Now if these "?" are really 'less than or equal' symbols or just 'equal' symbols then Lee Smith's Case function above is fine, but if they're really 'greater than or equal' symbols then you need to turn the Case function upside down.

  • Case(balance >= 50000, "e",
    balance >= 5000, "b",
    balance >= 2500, "a",
    )

otherwise you would always get "a" (unless balance < 2500), even when balance = 70000 since 70000 > 2500 is correct. smile.gif

  • Author
  • Newbies

Thanx guys. This is what I used

Case(balance > 1 and balance< 2500, "a",

balance > 2500 and balance< 9999, "b",

balance > 10000 and balance< 24999, "c" ,

balance > 25000 and balance< 49999, "d" ,

balance > 50000 and balance< 99999, "e" ,

balance > 100000, "f"

)

but for some reaason I am not getting the desired results. My logic for this is based on this:

1 - 2500 = a

2501 - 9999 =b

1000 - 24999 =c

25000 - 49999 =d

50000 - 99999=e

10000+ =f

I like to keep things simple:

Case(

balance < 0, "credit",

balance = 0, "paid",

balance < 2501, "a",

balance < 10000, "b",

balance < 25000, "c" ,

balance < 50000, "d" ,

balance < 100000, "e" ,

"f" )

If balance = 1, 2500, 9999, 10000, 24999, 25000, 49999, 50000, 99999, or 10000, you will receive no result with this calculation. Try using greater/less than or equal to, as in "balance >= 1 and balance <= 2500", etc.

Actually, you will get a result with these values:

If:

Balance = 1: "a"

= 2500: "a"

= 9999: "b"

= 10000: "c"

= 24999: "c"

= 25000: "d"

And so on...

Just to clarify: -Queue- is referring to the adydas calculation, kenneth is referring to mine. It's simple and it works.

My bad

Create an account or sign in to comment

Important Information

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

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.