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.

nested if - Calculation field not working properly

Featured Replies

  • Newbies

Hi Folks - I'm pretty new to FM Pro so please excuse my ignorance!

 

I have a database for my students marks - from the marks I am using a nested if to generate a comment depending on the mark gained by the student - it works fine except for the students scoring <35% which it lists as "Although a narrow fail, this would suggest that major revision, past paper work and making use of Supported Study is a must if a Grade C pass is to be achieved." I can't figure out why it won't work - any help gratefully received

 

Happy New Year to All

Edddiec

 

the formula I used is listed below

 

If( GetAsNumber(Prelim 2012 overall %) >= 80;"This would suggest a Grade A pass. Past paper work and Supported Study would help to secure this grade." ;
If( GetAsNumber(Prelim 2012 overall %) >= 70;"This would suggest a Grade B /A pass. Past paper work and Supported Study would help achieve a Grade A pass." ;
If(GetAsNumber(Prelim 2012 overall %) >= 65;"This would suggest a Grade B pass. Past paper work and Supported Study would help secure a Grade B or possibly achieve a Grade A pass." ;
If(GetAsNumber(Prelim 2012 overall %) >= 60;"This would suggest a Grade C/ B pass. Past paper work and Supported Study would help secure a Grade B or possibly achieve a Grade A pass." ;
If( GetAsNumber(Prelim 2012 overall %)>= 50;"This would suggest a Grade C pass. Past paper work and Supported Study would help secure at least a Grade C." ;
If(GetAsNumber(Prelim 2012 overall %) ≤ 45 ;"Although a narrow fail, this would suggest that major revision, past paper work and making use of Supported Study is a must if a Grade C pass is to be achieved.";
If (GetAsNumber(Prelim 2012 overall %) ≤ 35;"This would suggest that Intermediate 1 is too much of a challenge and would suggest that Access 3 would be a more appropriate level for presentation." ;"")))))))

First, it would be much better to use the Case() function instead of nested Ifs.

 

Now, I believe the reason why it doesn't work the way you expect is that any score less than 35 is also less than 45 - and this condition is being evaluated first.

  • Author
  • Newbies

Thanks for the advice. Moved the second last and last statements and it now works ok

 

Will look at using the case () function next time

 

Edddiec

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.