6 Replies Latest reply on Apr 16, 2017 10:55 AM by staywme

    Stacking two fields ....?

    staywme

      I have two fields with revenue results. Sometimes its an AirBnB booking with $200 and sometimes its Booking.com with $200

      Because their is a difference in how taxes and commissions are calculated I have to have two Room Revenue fields. In my

      overview layouts I used to (FM7) be able to overlay both these fields and on the browse and print it would show me only one result (the other field is always zero or better yet blank), but in FM15 this seems not to work.

      I'm very bad with formulas, but can I create a third field and have a calculation that basically says: If zero amount in one of the two fields use the one that does have an amount. And how the hell do I do that ???? Thanks Experts

      (I must have missed a lot of math classes when I was a ladd)

      Peter

        • 1. Re: Stacking two fields ....?
          TomHays

          Yes.  The third field would be calculated with something like one of the following.

           

          field1 + field2

           

          You described that only one of the two fields will have a non-zero value.  Thus the other will always be zero.

           

          Or if you want to handle cases where they might both be non-zero, this will let you have a default choice (field1)when both values are provided.

           

          Case(

          field1 > 0; field1;

          field 2

          )

           

          -Tom

          1 of 1 people found this helpful
          • 2. Re: Stacking two fields ....?
            philmodjunk

            On the other hand, you can still stake the fields in FileMaker 15. It's not clear to me why this did not work for you.

             

            In 15, you can even use Hide object when to hide the empty field, though if both fields are transparent and identically sized and formatted, simply stacking them should work for you just as in FP7 files.

            1 of 1 people found this helpful
            • 3. Re: Stacking two fields ....?
              keywords

              I agree with Phil and have used both approaches myself. There is nothing inherent in FM15 (or any of the versions since 7 for that matter) which would cause your solution to fail, so if it did you need to dig deeper to find out why.

              1 of 1 people found this helpful
              • 4. Re: Stacking two fields ....?
                Markus Schneider

                stacking fields should work under V15 - but sometimes, attributes need to be adjusted (ie transparency of the fields...), depends on what is not working as expected - for a test, place the fields aside, not stacked

                 

                Since (as Phil mentioned) FM15 allows objects to be hidden by condition (formula), thats a better way to go

                1 of 1 people found this helpful
                • 5. Re: Stacking two fields ....?
                  beverly

                  'stacking' can be problematic with Web Direct, should you use it; even with tricks to hide. So I just started avoiding. Slider Panels (you can make it appear seamless) can work, but must be triggered.

                  The calculation field is probably one I'd use.

                  beverly

                  2 of 2 people found this helpful
                  • 6. Re: Stacking two fields ....?
                    staywme

                    Worked like a charm. Thanks