1 Reply Latest reply on Feb 13, 2015 6:32 AM by philmodjunk

    Creation of records not working and other relationship questions



      Creation of records not working and other relationship questions



      Between the two tables "Kassa" (sales) and DAGOVERZICHT (Daily summary) is a relation between the two fields KASSA_DATUM (date of this sale) and DAGOVERZICHT_DATUM (the date of this summary).

      What I want is that for every unique date in KASSA , a new daily summary is created so it's possible to look it up.

      I've tried setting Allow creation of records via this relationship true for DAGOVERZICHT, but I still have about 10 unique dates on which sales happened, but only 2 daily summaries.

      Another thing that came to my mind is that filemaker automatically creates a n-n relationship instead of a n(Kassa)-1(DAGOVERZICHT).

      I also have this problem in some other relationships like the one between ALLEKASSABONNEN & KASSA , where I want it to be a one(ALLEKASSABONNEN) to many (KASSA) relationship, but filemaker forces me to use many to many and that confuses me.

      Same thing goes for relationships where I want a one to one relationship ( DAGOVERZICHT - KASGELD(Cash register money for that day)), it still creates a many to many relationship and I don't know how to enforce it. I've noticed that linking two PK's makes a one to one, but I have no idea how to set a date field type to PK...


      Basicly what I want to happen is that for every KASSA (sale)created, it checks wether or not that sale is on a unique date, if it is then it has to create a new DAGOVERZICHT(daily summary) (which is basicly a table full of sumfields) , and then immediatly also creates a KASSAGELD (cash register money) record, which holds all the info of the cash register in and outcome in one day.

      Thanks in advance,


        • 1. Re: Creation of records not working and other relationship questions

          "Allow creation..." makes it possible to use the relationship to create related records. It does not set up FileMaker to do so automatically. A person or a script still has to initiate an action that creates the related record. For example, if you had a portal from table A to Table B with "allow creation..." selected in the relationship for Table B, a blank row appears in that portal where you can enter data into fields and FileMaker, once you have entered data into a field, will create a new related record and update match fields specified for the relationship to establish a new Table B record related to the current record from Table A.

          Just because you have a relationship line where both ends of the line end in "crows feet", it does not mean that you have a many to many relationship. It just means that there isn't any field option specified to enforce unique values for that field in either match field specified in the relationship. To see a single line "connector" select "unique value" on the validation tab in field options, but you may find that your relationship and design of your database works just fine without this and don't limit a field to unique values without first considering how that will affect the function of your database.