Jump to content
Sign in to follow this  
davehoran

Invalid relationship when deleting records in converted databases

Recommended Posts

davehoran    0

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
davehoran    0

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  

  • Who Viewed the Topic

    2 members have viewed this topic:
    Lee Smith  Wang 
  • Similar Content

    • By 123
      Hey,
      I have the following problem. I'm working on a solution for the owner of several restaurants. Each restaurant has meetings once or twice a month. How would I structure the tables so that I could have a layout on which I select a restaurant and then inside a portal I get a list of all employees. On the portal for each row I want to have a button or checkbox to mark if an employee is present or not.
      I already have the following tables:
      Restaurants, Employees and Meetings
      So far I have a relationship between the Restaurants and Employees table which I use to assign employees to a restaurant, and a relationship between the Meeting and Restaurant table, which allows me to show all employees that work at a selected restaurant using a portal on the meetings layout. How do I proceed to solve my problem? Do I create another table MeetingAttendees or something similar that I use to keep track of people attending a meeting? How would I create a relationship then to allow me to mark certain employees as present and absent?
      Thanks in advance,
      Mike
    • By Stickybeak
      When I try to start FMP16 - since the latest update - I get an error message without any part of FMP appearing on the screen. There is a lot of data but the bit that caught my eye is this:
      Anybody else having or had this issue?
      Any known solution?
      Filemaker support seem to think its an Apple problem - something to do with my user account.
      Apple seem to think its a filemaker problem.
      Happy to supply the rest of the error message if required.
    • By jeffwest2
      Had to step away from this for a while, but now back with it.
      I have nailed up the two tables I want to sync, however, when try and sync, I get an error that reads
      Attempt to push data has failed (The message received from the server was : "201")
      I have two questions really.
      I don't need to push data, as no data will be allowed to be changed on the 'mobile' side, can I disable this, if this is what the issue is.
      What is a 201 error, and how can I identify which field is causing the issue?
    • By rt916
      I assist with a FMP 11 database that manages projects and related data, about 10,000 projects currently.
      I setup a new tool that tracks a ADL requirement with a simple YES/NO drop down value list. Users choose if the project requires ADL tracking by selecting YES/NO, and we have a layout that lists all 10,000 projects with the ADL requirement that shows YES, NO or empty value. This layout also shows lots of other project records that are searchable without error.
      I am trying to perform a Find on this layout to display all values with YES selected, or NO selected. The appropriate relationship is setup on the graph so my list shows all 10,000 projects, and other records that are searchable, but my YES/NO value list gives me a  "No records match the find criteria." Before I write a script with a button I am testing the find function steps first, and I keep getting the same error.
      I open the layout, click show all (10,000) records.
      I click Find then click the ADL Requirement and click either YES or NO.
      I click Perform Find and get the No records match this criteria error.
      This seems to be a very simple operation, to search records in the database, and for the life of me I cannot find why it isn't working!!
      Any help is much appreciated, thanks in advance!
    • By Martin Pineault
      Hi,
      I have a configuration table (named 'Usager actif') with 'Projet ID actif' and start/end date values (field name 'Bilan date début' and 'Bilan date fin') linked to a timesheet table (named 'FTemps lié Projet bilan') to show only the records that match, according to the following relation:

      This table is also linked to a step table (named 'Étapes lié FTemps lié Projet bilan') to show a list of steps used by the timesheet table (named 'FTemps lié Projet bilan'), base on the following relation:

      So the last table (named 'Étapes lié FTemps lié Projet bilan') is shown in a portal and it's working correctly (show only two steps used, for all the timesheet records). But I wanna show the total time used for each step (first step is 5 hours, and last one 95 hours). It's working correctly if the start/end date included all timesheet records. But if I shrink the ending date (removing 2 hours from the timesheet in step 2), the total time by step still show all time since the context does not follow from timesheet table to the step table in relation.
      I still see 5 hours for step 1 and 95 hours for step 2 (should be 93). The total time for all step is now 98 hours, since the ending date has been shrink (removing 2 hours on step 2).
      How can I do this (hope fully I'm clear enough)?
×

Important Information

By using this site, you agree to our Terms of Use.