Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Error creating child records in related table

Featured Replies

I am trying to set a field in a related table, via a script, but am getting this error:

"This operation cannot be performed because one or more required related records are not available and cannot be created."

 

This is the interrelation of my tables:

TableB::ID <*=1> TableA::ID <1=1> TableC::ID

 

The script is running in a layout based on TableB (many-to-one to TableA).  I am trying to have set a field in TableC ( one-to-one with TableA), so it is looking through TableA to set a field in TableC.  The related records in TableC DON'T previously exist, but I have 'Create records based on this relationship' checked in the relation from TableA to TableC, just for this purpose. 

 

In my dataviewer I see:

TableB::ID = 1111

TableA::ID = 1111

TableC::ID = ""

 

Anyone have ideas what's going on here, why I can't create the related records?

 

--  J

 

is allow creation of records enabled on B to A?

  • Author

Urrrmmm....no.  I suppose that it may not hurt anything ultimately, in practice, but it kind of scares me.  :)

 

TableA is kind of the primary table of the whole system.

 

Does the 'Create...' chain have to be present at each step?

If you want B to create a record in C going through A then Yes. If you dont want B to create records in A use another TO with B to C. 

  • Author

Durn.  I just tested it.  It DOES have to be enabled along each leg of the chain.  Grrr...

 

Hmmm...might mean a new TO with a direct connection between C and B.



Oh hey, that's what you just said.   :)   I hadn't refreshed my browser window. 

Yes, I believe you need to have "Allow creation of related records" set for both B to A and A to B.  You can "reach through" A to make new records in C, if the corresponding A record already exists.  This should not create a new record in A if a record with the matching ID exists already. 

 

An alternative is to create an additional occurrence of Table C in your relationship graph and link B directly to C. You can generate records from B directly in C with this relationship without effecting A. Another alternative is to have your script switch to a layout linked to Table C and generate new records in C directly. 

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.