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 sorry if this is the incorrect forum to post my query to but I am very new to this and am about to throw my machine out of the window...but before I do I thought I would ask the question:

 

I am writing an If Statement and need help! I want to say that If a field has a value greater than 1000 but less than 5000 then give a certain result. EG:

 

If ( Donations::sum pound ≥ "1000"  and ≤ "5000" ; "Grade 2 contributor" ; "Grade 1 contributor" )

 

with the calculation result being set to 'text'.

 

I am trying to do a database for a charity I work for, and they want to grade their contributors depending on how much they have given, but this is really, really and I mean really baffling me as I keep getting an error as soon as I try to save the calculation and it highlights the (less than or equal to) symbol. I think it is something to do with me using the 'and'???

 

There are actually 5 different grades of contribution so I was planning on just doing a set of If statements within each other but I simply cant get this 'greater than but less than' bit right!!!

 

Please, please and I can't stress enough pleases, can someone from this forum take pity on me and offer an answer! Thank you sooooo much....

I want to say that If a field has a value greater than 1000 but less than 5000 then give a certain result.

 

That could be written as =

If ( field > 1000  and  field < 5000 ; "certain result" )

Note that if you write =

If ( field > 1000  and  field < 5000 ; "certain result" ; "other result")

then "other result" will be returned for both field ≤ 1000 and field ≥ 5000 - which is not likely what you want.

 

 

There are actually 5 different grades of contribution so I was planning on just doing a set of If statements within each other

 

Then you definitely want to use the Case() function instead of "a set of If statements". For example =

Case (
field > 10000 ; "word-class benefactor" ;
field > 5000 ; "super contributor" ;
field > 2500 ; "generous person" ;
field > 1000 ; "pulls his weight" ;
"eh"
)

Note that the order of arguments is important: the function will return the result of the first test that evaluates as true.

Hi filemakmovice, and welcome to the forum,

 

I moved your topic from "Managing Scripts" to "Calculation Engine (Define Fields)”, because it doesn’t have anything to do with a script.

 

Before I could post a reply, comment made one similar to what I was going to say,

Before I could post a reply, comment made one similar to what I was going to say,

 

What else is new?  :laugh:

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.