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

code:


CASE (

Result >= 93 = "A+"

Result < 92 and Result >= 88 = "A"

)


...and so on.

quote:

Originally posted by gnault:

if the result is between 93 and 100 = A+

if the result is between 92 and 88 = A

Where it gets complicated, it's when the result is 92,6... I need to make sure it equals 93 to get A+...


This is a fun sort of calculation. Assuming result is the name of the field that contains the number grade, try this:

Letter_Grade (unstored, text)=Case(result<60, "F", result<75, "D", result<82, "C", result<88, "B", result<93, "A", result<100, "A+", "Scored higher than 99 somehow")

The Case() function will return the *first* true result. I made up my own grades above; you can play with the number values and their corresponding letter grades for your purposes.

  • Newbies

Hi,

Thank you for responding so fast. I tried to copy both calculations, but I get a message saying:

An operator (eg. +, -, *, /) is expected here.

And the first option in "" is highlighted.

I have filemaker pro 5v3. I weht in the file menu, define field, typed the field "grade" then hit "calculation", copied the calculation your offered and got the error message.

Any clue ?

Gen x

Sorry, this should be more clear:

Define a new field, Letter_Grade (or Grade, whatever you wish). Make it a calculation. In the define calculation window that appears, paste the following:

Case(result<60, "F", result<75, "D", result<82, "C", result<88, "B", result<93, "A", result<100, "A+", "Scored higher than 99 somehow")

Change any instances of "result" in the above with the actual name of the field that you want to base the letter grade on, otherwise FileMaker will give you an error.

Hope this helps!

[ January 02, 2002: Message edited by: The Bridge ]

  • Newbies

Thank you the Bridge...

It worked when I changed the , with ;

Case(Note finale<60; "F"; Note finale<75; "D"; Note finale<82; "C"; Note finale<88; "B"; Note finale<93; "A"; Note finale<100; "A+"; "Scored higher than 99 somehow")

isn't that weird ??

Gen smile.gif" border="0

  • Newbies

Hi,

I'm trying to translate (convert) a range of result to a specific grade.

In the field "result", which is a calculation of several other fields, I have numbers varying from 60 to 99.

In the field "grade", I would like to convert the results:

if the result is between 93 and 100 = A+

if the result is between 92 and 88 = A

Where it gets complicated, it's when the result is 92,6... I need to make sure it equals 93 to get A+...

Any clue how I can do that ? Thanks for helping out a newbie!

Gen

The difference between , and ; is due to FMP country versions.

US version use the ,

Others, such as Canada I'm assuming, use the ;

This is mostly because in Europe they use a comma as a decimal point, and so that could confuse the Calc.

  • Newbies

Thanks Sharka, the country differences could explain it. Glad you took time to let us know.

Gen

quote:

Originally posted by Sharka:

The difference between , and ; is due to FMP country versions.

US version use the ,

Others, such as Canada I'm assuming, use the ;

This is mostly because in Europe they use a comma as a decimal point, and so that could confuse the Calc.

Thanks for the clarification, Sharka... I should have clued in that gnault was using a different system format from the original example of 92,6.

FWIW, Canada is a wonderfully unusual beast, what with two official languages: in my part of the country I use comma delimiters; in gnault's part of the country the semi-colon is proper. I'm still not sure what the proper date format is around here. smile.gif" border="0

Yep, and it only gets better. Now, all Euroland countries will be officially using a decimal point instead of a comma (US style). However, all the Euro-versions of FMP are still set to only accept numeric entry 'comma' style. Major pain for data entry, no matter how it winds up format wise.

Upside is, if you're building for oversea clients, all you need is one table from their foreign FMP version, and use it as a master. All of its clones will follow the data-entry rules for that country, for both numbers and dates.... but I digress.

Gee, what ever happened to Pounds, Shillings and Pence and the slash separator? Hmm, I Guess it would be confused with the division operator. tongue.gif" border="0

FWIW, I now use the format YYYY-MM-DD on all my date fields unless my client specifically tells me to do otherwise (so far no one has complained). With this format, there is never any question whether month comes before day or not because they are in order of decreasing significance. Hence, the field will always sort properly even if it's set up as text.

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.