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 Emil
      FileMaker 15  for FM GO
      Refresh Portal script step gives an Error Code "116 Layout object is missing"
      Thoughts?  Thank you!
       
    • By Andrew Nicolay
      I'm helping a client who has an old install of Filemaker Server Advanced 11 running on a Mac Mini.
      It's been running Filemaker v11.5 for about 2 year without any issue... All of a sudden today, it stopped working!
      I checked to see if there were any updates installed from apple or java... NONE!
      I completely uninstalled Filemaker Server and reinstalled v11.5 and applied the java fix... still won't start.
      Just for laughs I installed v11.2, that installed fine, up and running no problem, as soon as I restart the Mac Mini, everything takes a dump.  When I go to localhost:16000 or serverip:16000 in the browser, nothing happens, as if filemaker server was never even installed.  If I double click the applet icon, it says "Unable to launch the application - Connection Refused".
      Any thoughts?
    • By Miss A!
      Hi Forum,
       
      I am working on a script to be triggered when a field is modified so that it can pull data and update fields on a layout. Some data is in another file and i do not know if possible how to access this file and search for the data i need?
       
      Any thoughts on how to accomplish this?
       
      Thank you for assisting,
      Miss-Amen
       
    • By mr_mike
      My users are getting this error "database not available" when attempting to access a solution (the only solution) on this server.  I get the error on a Macbook with Safari, they get the error with a PC using IE.
      I notice when searching for this error that some solve it by redeploying the server, or rebooting the server, or removing the "spaces" in the name and replacing them with "_".  I've tried all that.  Still getting the error.  I'm not sure what else to try.
      FMS 14.0.4.412 / WS 2012 R2

    • By dav1089
      Hello,
      I have two tables: Companies and dupcheck_companies...Self-joined with Companies:company = dupcheck_companies::company AND Companies:pk != dupcheck_companies::pk
      And attached script trigger with layout (onrecordcommit) to show custom dialog if  duplicate key (serial of table occurrence not empty) is found .. it works fine when duplicate company name value is found , but what if I want to check another field (phone number) for duplicates , I think it would be better if I could self-join with an OR condition instead of AND , but don't know how
       
      Please help!