1 Reply Latest reply on Dec 9, 2012 5:37 AM by JohnMorina

    Default result in a field if empty



      Default result in a field if empty


           Hi all,

           New here and to Filemaker all together. So please excuse me if I dont explain this well.

           On my shipping form I have billing information on one side and shipping information on the opposite.

           Some but not all of my customers have many shipping addresses. So i have a separate table giving certain customers multiple shipping address codes with the different addresses.

           So on my shipping form for the shipping addresses. i have a conditional pop up menu for the shipping codes based on the customer #.

           I have the shipping address fields on the shipping form set to pull from the Shipping addresses table based on this relationship.

           However if a customer does not have multiple shipping codes the conditional pop up field of course says "no values defined". If this happens I would like the billing address to fill in instead. I have tried many different things to attempt to get this to work. No sucess.


           Hope this makes some kind of sense.

           If any one could give any advise i would certainly appreciate it.



        • 1. Re: Default result in a field if empty

               Hi Lynn,

               You can accomplish this by using the Lookup function in an auto-enter calculation for each of the address fields.

               The calculation would look something like this.

               Case ( IsEmpty ( CustShipAddress::CustID ) ; Lookup ( Customer::Street1 ) ; Lookup ( CustShipCodeSelected::BIllingStreet1 ) )

               When the shipping is created if there are no records in the CustomerShipAddress table it will lookup From the customer record. if there are shipping records it will wait until you select a code.

               This will require an extra relationship from Shipping to the CustShipAddress table, besides the one you have for the lookup. Depending upon where the New Ship Form script starts you can avoid that by sending a script parameter or setting a Variable.

               Set Variable [ $AddrLookup ; Case ( IsEmpty ( CustomerShipAdd::CustID ) ; "Cust" ; "Shipping" )

               Case ( $AddrLookup = "Cust" ; Lookup ( Customer::Street1 ) ; Lookup ( CustShipCodeSelected::BIllingStreet1 ) )

               Hope this makes sense...

               John Morina

               Pueblo Systems, Inc.