7 Replies Latest reply on Feb 7, 2017 12:51 PM by canoevalley

    Conditional Formating

    canoevalley

      I have tried to put this calc together but roadblocks are getting in my way.

       

      Here is what I am trying to accomplish.

       

      I have two currency fields. One named Discount Price and the other named Rollback Price.

      The Discount Price field is always populated with a discount amount, however, when I want to enter a price in the Rollback Price field, I want the Discount price dollar amount to (text) to turn white. It essentially disappears.

       

      The reason I need this conditional format calc (which I think would be applied to the Discount Price field), is that I will be putting these two fields on the same report layout directly on top of each other. So if there is a Rollback price, the Discount price will disappear from the layout (which is all white). That way only one price shows on the report.

       

      Hope we can figure this out.

       

      Thank you.

        • 1. Re: Conditional Formating
          siplus

          A report usually regards more than one record.

           

          You are talking about single fields, which belong to a single record, so we need to know what the report is showing.

           

          Merely talking about interface, I would not like to see a report with some lines and a field which sometimes is a discount and other times is a rollback price. I would have to interpret each line.

           

          IMHO having 2 fields side by side, one of which is empty sometimes, is better, because we do read by columns when we have them.

          • 2. Re: Conditional Formating
            canoevalley

            Ok, so it is actually a catalogue and I think I figured it out.

             

            On the Discount Price field, under conditional formatting, Formula is: not IsEmpty ( Master File::Rollback Price ). Then I set the text to white.

             

            Voila.

             

            Thanks for the quick reply.

            • 3. Re: Conditional Formating
              siplus

              if your filemaker version supports it, hide when is better than conditional formatting white from a performance pov.

              1 of 1 people found this helpful
              • 4. Re: Conditional Formating
                canoevalley

                Oh really? I never thought of that option. Is your suggestion a better way? Performance?

                • 5. Re: Conditional Formating
                  siplus

                  instead of going for the field content, applying a style to it and drawing it (white, in your case), with hide when filemaker won't even bother dealing with it. That's some miliseconds gained

                  • 6. Re: Conditional Formating
                    keywords

                    You could accomplish what you describe with conditional hiding rather than conditional formatting. From what you describe, it sounds as if the Discount Price field is never empty, but the Rollback Price field is. So:

                    1.     Set up the Discount Price field on your report layout with the condition, Hide object when: not IsEmpty ( Rollback Price )

                    2.     Make these two fields the same size, and directly over one another, with Discount Price above

                    3.     To enable you to enter the Rollback Price on this layout, make Rollback enterable and Discount Price not enterable

                    The effect will be that you will see the Discount Price if the field below it is empty, but when you click on the field, you will click through the upper field directly into the lower one, and as soon as you enter a value there, the upper one will disappear.

                    • 7. Re: Conditional Formating
                      canoevalley

                      This approach would work as well.

                       

                      Thank you.