Sign in to follow this  
Followers 0

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

    • Relating tables with month and year
      By shevyshevy
      I have two tables Claims and Premium
      Records on both tables have dates
      I want to do an analysis for both tables on monthly and yearly basis with a calculation field
      Analysis (Claims::claims + Premium::premium)
      my objective is to be able to gather all the records for each month  and each year on both tables using that analysis. That is my basic task. There are other fields like Remark, and recommendation but they are based from the result I get from the Analysis. For example, Analysis field is > 120 ,  Remark shows Excellent..  
      please how do I achieve this?
    • FM Relationship Error Message
      By Spidey
      In my attachment, when I search for "Cutting tools" in the main table. It produces the following message.  Is there a way I can get rid of this message.  I think I know why because I got my product line through calculation of look up.  
      "This operation cannot be performed because one or more of the relationships between these tables are invalid. "
    • ODBC Error
      By Cerbera
      Hi all,
      It's me again....
      I've temporarily gotten around my issues with "required value" fields in SQL data by adding a default value to all blank fields, however I have now found another error.
      I have a table of customers (BP_Details) which is retrieved from SQL server view using a DSN.
      I then have a local Filemaker table ("BPAddon") which I've linked to the BP_Detials table using a unique customer ID field.
      I wish to populate the records in the addon table via the Cusomter layout to supplement the data from SQL.
      As there are no records in the addon table I've selected "allow creation of records in this table via this relationship" on the add on table side.
      I can browse records fine, however as soon as I add data in a field on the addon table I receive an ODBC error: "You cannot specify scroll locking on a cursor that contains a remote table".
      Am I doing something wrong in the relationship?
      Thanks for any help!

    • Script find returns error: 500 regardless of date format
      By Eli Walker
      I'm running a script that should find a set of records within a specific date range. The date range is contained within a variable '$DateRange' which is then entered from the 'Perform Find' script step. Regardless of how I have the date range formatted, the script returns error 500 after the find. I've entered the date both as '1/22/2012...2/26/2012' or '22/1/2012...26/2/2012' or '1-22-2012...2-26-2012' and nothing seems to work. I've run this find request with the value I see for $DateRange in the data viewer while the script is running manually and it works without issue. It just doesn't work during the script. I've run this sort of find before without any issues... the only thing that has changed is that I've upgraded to FM14 (from 13). Any ideas???
    • Need through relationship
      By pctechtv
      While creating a database that has Products, Suppliers and Lines I have come across the need to calculate a count of the suppliers from the context of a Products record. My relationship is like so:

      My question if I want to pull a lot of information about Supplier is should my portal in the Products record be from Suppliers or from Lines? If the best answer is Lines, could I still have a count of related Suppliers by using the primary key from that table in the portal? Is it a bad idea to use fields from a related tables portal other than its own? Thanks