Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4305 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted
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

 

Posted

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?

Posted

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. 

Posted

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. 

Posted

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. 

This topic is 4305 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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