Jump to content
Server Maintenance This Week. ×

Format Button/Field if there are related records


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

Recommended Posts

Hi,

 

I have a FileMaker database that is acting as an archive for items deleted from our primary database (not FileMaker). Effectively, the 'Home' layout shows a fairly standard set of contact data. Below that, I have a Tab control, each with a Portal showing related records (so the tabs are Orders | Subscriptions | AdvertisingFutures | Company Details | Mailings )

 

I would like to alert the user to the fact that there are related records somehow. Whether conditional formatting is the best tool for this I'm not sure, but either way, I'm torn between (and don't know how to implement) the below scenarios;

  1. Disable a Tab if there are no related records (portal record count = 0)...perhaps greying out the Tab title as a visual indicator.
  2. Enable a Tab if there are related records (portal record count >= 1) and colouring the Tab title as a visual indicator.
  3. Perhaps more simply, creating visual clues on the main Contact screen which show "True" or are highlighted bright green if there are related records. This would mean creating fields in the Contact table like 'txtOrdersTrue', 'txtSubscriptionsTrue' and so on and conditionally formatting those appropriately if there are related records to view.

I have searched around and can't quite find what I'm after so any help much appreciated.

Link to comment
Share on other sites

Just test with

=  NOT IsEmpty(relatedTable::related_foreignkey)

 

If you test against the foreign key (the match to the parent record), you will get "False" if there are no children (portal) records. You will get "true" if there happen to be 1+ related children records. IsEmpty() function is the proper one for this test. Remove the "NOT" if you prefer the reverse test (True if there are NO related records) in your conditional formatting dialog.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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