Jump to content
Sign in to follow this  
dansmith65

[Samples] View Selected Child

Recommended Posts

File Name: View Selected Child

File Submitter: dansmith65

File Submitted: 22 Aug 2012

File Category: Samples

FM Version: 11

This is a modification of comment's sample file found here: http://fmforums.com/forum/topic/71867-getting-more-out-of-filtered-portals-2view-selected-child/

This version uses custom functions to manage the selected values in a single global variable, and a calculated field/relationship instead of a filtered portal.

The goal was to provide access to the selected child via a relationship, and to define a default selection, if no child has been selected.

This should work with versions older than 11, but I didn't bother to test with any older versions of FileMaker.

Click here to download this file

  • Like 2

Share this post


Link to post
Share on other sites

Why not just use a global field?

Share this post


Link to post
Share on other sites

Because the selected child would be selected for all parent records. This method allows each parent to have it's own selected child.

Share this post


Link to post
Share on other sites

Well, no, the selected child would only be visible to the associated parent record.

But with a global, other parent records would not have a selected child; so - aha - I see the point of your method.

Share this post


Link to post
Share on other sites

That's a cool way to accomplish the same result. So, to compare your global field method to mine...

ViewSelectedChildGlobal by Comment

  • requires initialization on file open

View Selected Child by Dan Smith

  • requires Custom Functions
  • script requires Refresh step, which causes flashing on Windows

Ok, I thought I would find more differences than that, but they both use a single field, a single "select" script, per-user selection storage method. I wouldn't even know how to go about testing performance differences. My guess is that there's not a big enough performance difference to worry about.

Share this post


Link to post
Share on other sites

ViewSelectedChildGlobal by Comment

  • requires initialization on file open

Well, I wouldn't say "requires". It's merely a quick way to provide a "default" selection. I am not convinced that's a good idea, but I wanted to match my file's features to yours.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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