We have reset all users FileMaker related profile fields. Please take the opportunity to update your information,  this will provide background to members whom read your posts. Click here.

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  

  • Similar Content

    • 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)?
    • By NewBoard
      I am currently building a database to handle the inspection sheets used by our Quality lab. Here is the relationship layout:

      For each revision on the Revisions table, I have a differing number of Dimensions that need to be measured (some parts/revs will have 5 dimensions, while others will have 15). Each dimension has a specified type of instrument used in measurement, and a max/min value. The instrument used is a drop down menu that references a list of instruments/gages that we use.
      Here is how I have my inspection sheet currently laid out:

      The portal on the left points towards my dimensions table. It shows the data corresponded to the specified Part Number and Revision level. The data contained in this portal is uneditable from this form. The portal on the right points towards my RecordedDimensions table. It will store data that will correspond back to the Lot# associated with that inspection sheet.
      I also have a table that pairs all the different types of instruments we use, with their corresponding gage ID's:

      Now I would like my user to be able to click on the dropdown box under Instrument#, and that drop down box will only show the Gage ID's for the specified gage. So, if on the dimensions table, a dimension calls out for Digital Micrometers to be used, then when my user goes to select the instrument ID (which is saved in the RecordedDimensions table) it will would allow them to choose 151, 152, 153, 306, 324, 330, and 331.
      Please let me know if I have not provided enough information/pictures, I will gladly provide more.
      Thank you in advance for any assistance you can offer me!
    • By Auraboros
      Hi...I have created a database using a "modified" anchor buoy method and so far everything works great...but...I have a portal in a "join table" that works fine...however, my button that is supposed to open the record in the portal row does not function...it returns nothing. The records are indeed related (see RG) as the fields show up from the related table without relational conflicts, but this button that is supposed to open the "library" table with the related record pulled up simply does nothing. 
      I have attached the DB. Also a screen shot of the table where the portal is (it is actually a join table layout, this may be the problem). I don't understand how the button (with the little arrow) does not go to the table that the actual portal record, which IS related because I see it show up on the portal row...what is not right here?
      Thanks!
      Todd


      **MusicalAmericaPRESUB copy.fmp12
×

Important Information

By using this site, you agree to our Guidelines.