4 Replies Latest reply on Oct 29, 2010 11:25 AM by Indy14

    Question on filling field in FileMaker Pro 11

    Indy14

      Title

      Question on filling field in FileMaker Pro 11

      Post

      I have a field that is labeled Quantity. At the present time I have it filled as a calculation

      Quantity=

      Case(

      Product ID = 1; Length*Width;

      Product ID = 2; Length*Width;

      Product ID = 3; Length*Width;

      Product ID = 4; Length*Width;

      Product ID = 5; Length+Width;

      Product ID = 20; Length*Width;

      Product ID = 12; "1";

      Product ID = 6; "1";" ")

      It was working fine until I needed to manually enter a Quantity if the Product ID was = to a 12 or 6 and not have it as a 1.

      I don't know how to change the definition.

      Any help would be appreciated.

        • 1. Re: Question on filling field in FileMaker Pro 11
          ninja

          You have a calculation running in a calculation field.  There is no manual override.

          Are there static conditions that define when ProductID = 12 or 6 but Quantity should not equal 1?  These can be built into your calculation.

          If there simply needs to be a manual override, then a strict calculation field is probably not the best thing to use here.

          Can you flesh out your situation a little more?

          • 2. Re: Question on filling field in FileMaker Pro 11
            Indy14

            AHUNTER3 on a different forum suggested the following and it worked.

            Create an override quantity field.

            Case(
            Product ID ≥ 1 and Product ID ≤ 4; Length*Width;
            Product ID = 5; Length+Width;
            Product ID = 20; Length*Width;
            Product ID = 12 or Product ID = 6; NewOverrideQuantityField; " ")

            Thanks for your comments.

            • 3. Re: Question on filling field in FileMaker Pro 11
              philmodjunk

              You can even set up a text field in a product look up table such as where you have the product's unit prices. You would store the calculation expressions for each product ID such as Length * Width for products 1 and 4 in this field.

              Then you can define a matching text field, CalcExpression,  that looks up this text just like a product description or price.

              Your calculation would then look like this:

              Evaluate ( CalcExpression )

              This has the advantage of not needing to rewrite your case function every time you add a new product or change how an existing product is calculated. Such changes can then be made simply by editing records in your products table.

              • 4. Re: Question on filling field in FileMaker Pro 11
                Indy14

                Thanks, I will definitely give that a try.