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

Using a Calculated Field in a relationship....


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

Recommended Posts

  • Newbies
Posted

I am newbie to FM5, but have so far figured out how to link two databases using a calculated field (that is the combination of two fields), by creating a calculated text field that is field1: + field2:, in both databases, then creating a relationship in which ID:=ID::P . That works well, until I try to add a record.

When I add a record, I get the message:

The relationship ID is not valid and must be corrected before this field can be modified.

I think I understand what is happening, the portal does not know what the values of the 2 fields the calculated field is trying to compute, and therefore, cannot fill in the ID field, to continue adding the data.

Can someone help me with this ?

I know I am missing something script related, but I have not been able to figure this one out yet.

Lotus Approach was so much easier for this sort of thing !

Thanks,

John Martoccio

Posted

If you exit the record immediately after creating it, it forces filemaker to update the calculated fields and then the relationship should work. To exit the record, click somewhere on the layout outside of a field. If you are using a script to create new records (a good idea), then include an Exit Record script step right after the create record step.

Posted

Or you could change the Right Side calc to an auto-entered calculation.

This is particularly true for Constant relationship, where you can have a constant based upon 2 indexed calcs (=1), but you won't be able to create related records through this relationship.

By changing the right key to an auto-entered value of 1, it will work.

This topic is 7729 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.