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 AndyShearer
      Hi, I am very new to using ScriptMaster and have run into some problems when trying to run a few test lines of java. I am trying to create a module that will modify AcroFields on a PDF document, and am therefore going to be using the iText library. I have added this in the Jar Libraries section. Here is the script I am trying to run:

       
      import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.kernel.pdf.PdfReader; import com.itextpdf.forms.PdfAcroForm; //Initialize PDF document PdfDocument pdf = new PdfDocument(new PdfReader("C:/Users/Andy/Desktop/VA_Form.pdf"), new PdfWriter("C:/Users/Andy/Desktop/New_VA_Form.pdf")); PdfAcroForm form = PdfAcroForm.getAcroForm(pdf, true); and I am getting this error when attempting to run the script:
      java.lang.NoClassDefFoundError: com/itextpdf/layout/element/BlockElement Parameters: {data="my custom data"} ---Script--- Script: import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.kernel.pdf.PdfReader; import com.itextpdf.forms.PdfAcroForm; //Initialize PDF document PdfDocument pdf = new PdfDocument(new PdfReader("C:/Users/Andy/Desktop/VA_Form.pdf"), new PdfWriter("C:/Users/Andy/Desktop/New_VA_Form.pdf")); PdfAcroForm form = PdfAcroForm.getAcroForm(pdf, true); return "true!"; I am not sure how the classpath works in ScriptMaster, but assumed it was to do with this? I have four additional libraries (Itext7-Forms-7.0.0.Jar, Itext7-Io-7.0.0.Jar, Itext7-Kernel-7.0.0.Jar, Itext7-Pdfa-7.0.0.Jar).
      Any help is much appreciated, I am really stuck and can't seem to find any help in previous posts.

      Thanks
    • By Guy_Smith
      YIKES!  I tried to generate a DDR for my solution and got the following error:  
      SAXParseException:  Invalid character 0x12 in attribute value 'PlatformType' (Occurred in entity C:/Users\guys\AppData\Local\Temp\FMTEMPFM5128_4.tmp', at lime 24503, column 981.)  I have attached a screenshot for clarity.  The PlatformType bit is interesting as I work on the file at my office on a PC (Windows 10) and at home on a Mac (OS X Sierra).
      I clicked the OK Button three times and a DDR popped up, but only contained the Report Overview Page:  The correct amounts of Tables, Relationships, etc. showed up, but none of the links work:  It's an empty DDR.
       
      After shutting down FMP, reopening the file and trying again, I received the same error except the "FMTEMPFM5128_4.tmp" changed slightly to "FMTEMPFM5128_6.tmp".  (the 6 replaced the 4)
      I am, as usual, clueless - any ideas out there?
       
      Thanks,
      Guy
      SAX Parse Exception 092916.pdf
    • By Spidey
      Hi,
      I have FileMaker 11 and I created a interface to pull data from my website's sql.  I am able to change the name of a product, but I cannot change the price of the mysql table through the FM 11 interface.  Is there something I miss doing?   I am using odbc to connect.  Thanks.
       
    • By beerad
      I am modifying the Invoice sample that comes with FM to provide some basic Inventory management functions.  Works pretty well.  However...I really need to be able to order a product in 2 ways :  (1) (Kit - ISBN) and have that deplete and ship all of the parts that make the kit. (2) as individual pieces)  For example:
      Kit 1234 (includes)
      3 of part 2234
      5 of part 9987
      1 of part 097
      Someone might order Kit 1234 PLUS an extra 9987.
       
      Make sense?  No clue on how to connect them.  Thanks in advance File Maker Jedis.
    • By Roger Tuan
      Halfway through a Reset Sync the sync stopped with an "Error: java.io.EOFException" in the status area.
      Upon retrying and restarting MirrorSync, every action results in the "error unmarshalling return" error shown below. I can't create any new syncs.
      Redownloaded the config client but still the same error. Is there somewhere I can go to delete all config client related files and start over?

       
      I had set up a sync and everything went fine, syncing 100,000 records.
      I then modified the the Customization script in FM to constrain found records to some 2000. I then right-clicked my sync and made it Reset Sync Data, hoping it would get rid of the excesses.
      MirrorSync spent some time deleting records before crashing with the error message "java.io.EOFException".
      Sent a log report.
      Trying the MirrorSync config client from another computer resulted in the same error. I am going to uninstall and reinstall MirrorSync now.