1 Reply Latest reply on Nov 3, 2010 9:27 AM by philmodjunk

    Problem getting calc field to populate properly

    bate01

      Title

      Problem getting calc field to populate properly

      Post

      I have a problem with 2 different calc fields that I am working on. I know what I want it to do but I also know that am not telling Filemaker in a way that it understands. This may be done in one calc - I am just not sure how to proceed.

      What I need is:

      1) If field occupancy status is non-occupiable or vacant then field employee # = none

      2) If field occupancy status = non-vacant then field current capacity = 1, if occupancy status = vacant or non-occupiable then field current capacity = 0

      I hope this makes sense to someone. I am new to the calc fields and I am trying to learn quickly.

      Thanks for your help.

        • 1. Re: Problem getting calc field to populate properly
          philmodjunk

          If ( YourOccupancyField = "non-occupiable" or YourOccupancyField = "Vacant" ; 
               "none" // or just "" for an empty field ; 
                Employee#Field )

          It's also possible to use Case instead of If for this.

          For your capacity field, you could just use: YourOccupancyField = "non-occupiable" or YourOccupancyField = "Vacant"

          as results of True will be return a 1 and results of False will return a 0.

          You could then rewrite the first calculation as: 

          If ( CapacityField ; 
                Employee#Field ;
                "none" // or just "" for an empty field 
              )