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

Nesting?

Featured Replies

Hi everyone,

I have a field that is set by a calculation. It depends on another field. Currently the field looks like the following:

case(

recipes::serv_Unit = "Ounce"

or

recipes::serv_Unit = "Pound";

"Weight";

recipes::serv_Unit = "Cup"

or

recipes::serv_Unit = "Gallon";

"Volume")

the problem I have is that I have many more measurements in each category. I thought there was a way to enter the recipes::serv_unit = part once and nest the possible entries. How can I do this or did I just dream it?

Thanks in advance

If I understand what you are asking then just create u have defined just a relational db issue.

Just create another db that contains the following where Compare and Return are field names:

Compare Return

Ounce Weight

Pound Weight

Cup Volume

Gallon Volume

And then Have a relationshop between your field and Compare and then of course have it show the field Return next to your comparison field.

  • Author

Let me try to explain better. What I want is a field that says

case(serv_Unit = "ounce", "pound", "kilogram";

"Weight";

serv_Unit = "cup", "Pint", "Liter";

"Volume")

without having to type "or serv_unit =" between values. Does this make more sense?

Edited by Guest

Not sure why u care about the or but you should be able to write your own function. Is this the extent of the cases or do u have more? Can you explain why you dont want to use the or?

  • Author

Just a lazy typist I guess. Plus i thought I saw it done before where all the values could be grouped without adding the or and the field name before every value. I have many more values and I like to be compact and efficient. No big deal, if it can't be done without a custom function, I'll just keep it the way it is.

Im not 100% sure but i think u could only do that with a custom function sorry.

Slobley,

No you cannot prevent entering the relationship name with each possible choice. In FileMaker Pro we cannot provide a case statement similar to C or VB where we could write:

Select(re:serv_unit)

case x,y

setfield

case ....

I have written many big calculation fields like it. I would suggest since it is only a one time entry, enter it manually.

Try:

Case (

Position ( "+Ounce+Pound+Cup+Gallon+" ; "+" & recipes::serv_Unit & "+" ; 1 ; 1 ) ;

"Volume"

)

lol ugly as sin looking but very effective. As always where there is a will there is a way usually :)>

good job

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.