Sign in to follow this  
Followers 0
davehoran

Invalid relationship when deleting records in converted databases

2 posts in this topic

I am working with a FileMaker application that was built and maintained in FMP4, and am trying to migrate into FMP11.  The files were converted first to .fp5, then imported into FMP11 and coverted to .fp7.  Overall the fields, layouts, scripts and security accounts survived the process with only some adjustments.

 

However, there is a problem with deleting records through a portal.  Our main DB layout contains a portal to another table in another .fp7 file.  The Relationships chart shows the relationship, and has the "Allow creation of records in this table via this relationship" and "Delete related records in this table when a record is deleted in the other table" checkboxes set for the portal source table.  New records can be added through the portal with no problem, but when trying to delete I get "This operation cannot be performed because one or more of the relationships between these tables are invalid."

 

Some particulars: The delete button is a container field from another table/file (not the portal source file).  The Relationship is keyed on an ID field, but that field is not shown in the portal; the Delete Portal Row script is preceded by a Go to Field[select/Perform] that references a name value field on the portal row.  The portal source table has Relationships that also set the "Allow creation of records in this table via this relationship" and "Delete related records in this table when a record is deleted in the other table" checkboxes - so deleting the portal row should also delete rows in that relationship (cascade).  Deletion doesn't even work when clicking the "Delete Record" button directly on the DB file. (I've seen on numerous occasions that this particular dialog is unhelpful and I agree - its no more helpful than the Check Engine light in your car).

 

I will also note that this delete functionality DID work in the conversion from .fp3 to .fp5: I can open these .fp5 files in FMP5 and the app works fine.

 

Any thoughts?

Share this post


Link to post
Share on other sites

Update:  I did find the culprit that was breaking the delete script.  There is a self-join that uses a key value of the table combined with the key value of another table.  I believe that when deleting this calculated field does not resolve and breaks the relationship.  I removed the relationship and the process worked fine.

 

I AM curious as to why this relationship worked in FM5: The delete process does complete with the relationship in place.  What changed in how self-joins work in FM11 versus FM5?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • By Rikki
      Hi guys,
      Sorry I do not know the terminology of what I need.
      I am trying to setup a database to record some info on postcodes. What I need to do is, each supplier can have 4 types of lead (back data, profile, survey, 2nd use). I have two tables for suppliers and postcodes already. I also have 2 join tables for many to many relationships. I need each field in the postcodes database to be able to store a count for each supplier's lead type.
      Eg:
      Supplier    - Lead Type - Postcode - Count
      Supplier A - Back Data - AB            - 20
                                           - BB            - 155
                                           - CB            - 30
       
                           Profile     - AB             - 55
                                          - BB             - 27
      My problem is with the way I have set the relationships up currently. When I add a count for a postcode it adds that count for all suppliers. I need the postcode count to be specific to each supplier and lead type.
      Can anyone tell me what I need to do to get this working correctly? I have attached a screenshot of my relationships.
      Thanks

    • By adyf
      I'm getting the attached error messages when trying to modify records in a file. It's appears as though there is some protection in place, privilege sets etc, but there isn't and never has been. I've tried recovering the file to no avail, is there anything else I can try? I haven't accessed this file in approx. 6 months, but have never had issues before and I'm the only user of the file.


    • By transpower
      I and most of my clients are still on Windows 7 and Windows Server 2003.  I have several FileMaker executable files (solutions) developed using FileMaker 11 Advanced.  Will these run on Windows 10?  Will the Windows 10 compatibility mode (i.e., Windows 7) run these files?  I don't have a Windows 10 machine to test.
    • By Tim Cormier
      Since this morning we have been receiving an Error when trying to process credit cards using Plastic. Anyone else using Payeezy and experiencing this issue? Any suggestions?
      Thanks!
    • By avo388
      Hello!
      I have re configuring the Research Notes Starter Solution - it works quite well for what I need. But I want to create a couple of extra tabs with portals, but I'm having trouble understanding the how the current IDs are being created (using a calculation) for the TYPE MATCH FIELD in the Data table for Notes, Documents and Media?
      Could anyone help me understand this? Should I just build it from scratch? I'm using Version 14.
      Thanks for your time.