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

Make Sure Record has at Least One Related Record..


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

Recommended Posts

  • Newbies
Posted

Not sure if this is the correct forum for this question, but...

How can I ensure that a record has at least one related record?

Example: I have a "Check" table, with a corresponding "CheckDetails" table (with a CheckID key). Each check can have multiple expense categories. However, some users occasionally forget to assign a category (or categories) for a check. How can I make sure that the category is created - at least one related record created?

Many Thanks,

Erik

Posted

You can use this formula as a test for related records:

not IsEmpty(CheckDetails::CheckID)

However it may be tricky (if not impossible) using it in a field validation because related records won't exist at the time the record is created.

Posted

This is the kind of problem that can be solved by a well designed interface; in this case, forcing the user to use a "new record" script that creates a master record and the first related record in one step.

Then record-level validation can be used to ensure the data is valid.

  • Newbies
Posted

Thanks for the suggestions. I will incorporate a new record script, and have already built in a record validation.

However, how do I auto-enter the amout of the check into the first CheckDetails, CheckDetails::Amount, when the CheckDetails record is created before the check amount is entered? I currently have a field Check::AllocatedAmount, and CheckDetails::Amount is set to auto-enter Check::CheckAmount - Check::AllocatedAmount, which assists the user by automatically filling the unallocated amount into the next details record.

Posted

if you are using a portal which contains the check details you can move to the portal and set the field.

if the check Details table is not going to displayed on the layout where Checks is, then you'll have to switch to that layout and set it .. and then switch back.. see freeze window which may help to do this.

on the other hand, if you can save this 'auto-enter' amount in a global and your user will then be going to a check details view, you can then access that global from the checkDetails layout and populate the checkDetails::Amount with it in a script.

there's a few different ways (even more than i have mentioned i believe) to do it.

hope that gives you some ideas,

sincerely,

J__

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