Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7033 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted (edited)

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
Posted

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?

Posted

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.

Posted

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.

This topic is 7033 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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