2 Replies Latest reply on Jan 7, 2014 4:45 AM by Gilo

    How would u do it?

    Gilo

      Title

      How would u do it?

      Post

           Hi

            

           I need a DB, where i have clients. Each client can have one or more contracts. 

           So I would do 2 tables: clients and contracts

           Now i want to have a field in clients, which returns me true/false if the client has a contract A.
           A second field in clients, which returns me true/false if the client has a contract B.
           A third field in clients, which returns me true/false if the client has a contract C.

           Is this possible?

        • 1. Re: How would u do it?
          philmodjunk

               If you have this relationship:

               Clients---<Contracts

               Clients::__pkClientID = Contracts::_fkClientID

               Then you can set up a calculation field in Clients that returns true if any one of the related Contracts records has a specific value in a specific field:

               Not IsEmpty ( FilterValues ( List ( Contracts::ContractType ) ; "Contract A" ) )

               In FileMaker 12 or Newer, It's also possible to do this with the ExecuteSQL function.

          • 2. Re: How would u do it?
            Gilo

                 Works great Thanks