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.

Goofy Case Calculation

Featured Replies

I'm always comeing here for advice. THis is by far the best FileMaker Forum anywhere.

Any advice would be appreciated. I am tying to figure this problem out.

First of all, It seems FM doesn't like my calculation.

Case (

ROCPG3 ≥ 001 and ≤ 029 ;category ID = 40;

ROCPG3 ≥ 030 and ≤ 032 ;category ID = 41;

ROCPG3 ≥ 033 and ≤ 040 ;category ID = 42;

ROCPG3 ≥ 041 and ≤ 044 ;category ID = 44;

ROCPG3 ≥ 045 and ≤ 050 ;category ID = 45;

"n/a" // default value

)

Next, i was wondering if it is possible to contain in the same calculation, set a 3rd field (category ID Name) to display a value from a defined list based on the value calculated above.

In other words if the value is 40 change name to "xx172", if the value is 41 change name to "xxxB", ...

Is this possible or should i create a second case statement on the 3rd field?

Thanks to everyone for viewing my post and any guidance is helpful.

Thanks

Lol, good work sucking up ;) Just kidding, I Love these forums too :)

On to the question

Case (

ROCPG3 ≥ 001 and ≤ 029 ;category ID = 40;

ROCPG3 ≥ 030 and ≤ 032 ;category ID = 41;

ROCPG3 ≥ 033 and ≤ 040 ;category ID = 42;

ROCPG3 ≥ 041 and ≤ 044 ;category ID = 44;

ROCPG3 ≥ 045 and ≤ 050 ;category ID = 45;

"n/a" // default value

)

2 Things wrong with the above:

1) You have reference the field for both the greater than and less than statements

2) You shouldn't be referencing the field in second portion

e.g.

Case (

ROCPG3 ≥ 001 and ROCPG3 ≤ 029 ; 40;

ROCPG3 ≥ 030 and ROCPG3 ≤ 032 ; 41;

.etc

.etc

.etc

)

Secondly... yes, just make your 3rd field either an auto-enter calc or a basic calc (depends if you want the field to be editable) and use a case statement based on the second field... then you get a little daisy chain effect

Field 1 Edited

Updates Field 2 (References Field 1)

Which in turn updates field 3 (References Field 2)i

  • Author

Thanks GenX,

in fact i just figured out i needed to list my ROCPG field name twice in each line while i was waiting for a response but thanks for listening.

Also thanks for the advice on the second calculation.

I appreciate your help.

as for the sucking up bit, ya gotta

Chirstmas is just around the corner.

Excuse me if i sound a little too mushy

pryjda

... Hey no, There ain't nothing wrong with being mushy for christmas ;)

Glad i could help to some extent.

i just figured out i needed to list my ROCPG field name twice in each line

Actually, you don't. Something like this should produce a similar result:

Case (

ROCPG3 < 30 ; 40 ;

ROCPG3 < 33 ; 41 ;

ROCPG3 < 41 ; 42 ;

ROCPG3 < 45 ; 44 ;

ROCPG3 < 51 ; 45 ;

"n/a" )

Also note that [color:blue]ROCPG3 < 30 is the same as [color:blue]ROCPG3 < 030, but NOT the same as [color:blue]ROCPG3 < "030". The first two use a numeric comparison, the last one is a text comparison.

.. Hmm, overlooked the basic logic...

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.