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

Featured Replies

Here is a puzzle.

I'm trying to convert answers like 1, 2, 3 etc into grades like A,B,C etc.

I have a field called gAnswer which contains answers separated by a carriage return:

3

5

2

1

4

5

etc.

If I use the middle values functions as follows:

MiddleValues (ImportData::gAnswer ; 2 ; 1 ) it calculates to the 2nd value in the field ie) 5

But when I try to set another field to the converted value with this statement I get "F" every time:

Case(MiddleValues ( ImportData::gAnswer ; 2 ; 1 )=1;"A";

MiddleValues ( ImportData::gAnswer ; 2 ; 1 )=2;"B";

MiddleValues ( ImportData::gAnswer ; 2 ; 1 )=3;"C";

MiddleValues ( ImportData::gAnswer ; 2 ; 1 )=4;"D";

MiddleValues ( ImportData::gAnswer ; 2 ; 1 )=5;"E";

"F")

This has me confused. Any ideas?

try

Case ( gAnswer = 1; "A";

gAnswer =2;"B";

gAnswer =3;"C";

gAnswer =4;"D";

gAnswer =5; "E";

"F")

HTH

Lee

  • Author

Thanks but that doesn't work because gAnswer is not equal to 1 or 2 or 3 or 4 or 5. gAnswer contains:

3

5

2

1

4

5

all separated by carriage returns. In other words gAnswer contains all of the answers for a test. I'm trying to extract the various values individually with the MiddleValue function and although the MiddleValue function does calculate to 5 or 2 or 1 or 4 etc. depending on the parameters, I can't seem to get it to stick when I use the Case statement?

MiddleValues() returns the value followed by a carriage return. That's why none of your tests returns true. In version 8, you can use the GetValue() function instead.

BTW, it seems Choose() could be more efficient here than Case().

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.