Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Using the Go to Related Record script step

From: FileMaker Pro 11 Essential Training

Video: Using the Go to Related Record script step

After you've established some table relationships inside your FileMaker file, you can start benefiting from some of the relationship-based functionality. We've already discussed in previous movies in this chapter the ability to use related fields in your layouts, which are basically borrowing the field values from the parent tables. And you see here in this layout, we've already discussed how we can add portals, a layout object that allows you to see related child records and your parent record. And now I'm going to actually show you how relationships can affect scripts. In particular, there is really handy script step that I want to show that's called Go to Related Records.

Using the Go to Related Record script step

After you've established some table relationships inside your FileMaker file, you can start benefiting from some of the relationship-based functionality. We've already discussed in previous movies in this chapter the ability to use related fields in your layouts, which are basically borrowing the field values from the parent tables. And you see here in this layout, we've already discussed how we can add portals, a layout object that allows you to see related child records and your parent record. And now I'm going to actually show you how relationships can affect scripts. In particular, there is really handy script step that I want to show that's called Go to Related Records.

So what we're going to do in this example is place a button for this script on the Customer record that a user can click on and what it will do is pop up a new window that will display all of the related invoice records in a list that can be printed and all this can be done in one simple script step. So first let's go into Layout mode and let's draw a new button. And let's pick Go to Related Record.

And if you go and hit the Specify button, you're going to see that the window "Go to Related Record" Options appears. Now the Go to Related Record does exactly what it says. What we're actually looking at when we're viewing this layout is a customer and that customer's related invoice records. So essentially what we're going to do in this script is go to these related records, which means go to the table they're based on, create a found set with just these related records, and go to a layout that's based on that table. And this is a pretty handy trick because you might want to print these, or you might want to do something with them in another script or whatever it might be, but it does a couple of things in once.

It navigates to the proper table and layout, and it creates a found set for you. It's a pretty handy tool. So all you have to do is make a couple of decisions here. First, you'll see we want to show related records from. And when you choose Get related records from, what you're really saying here is, what records do you want to display in this new window or what records do you want to navigate to? And so what we're doing is navigating from the parent to the child. So really what we want to do here is see the Invoices. And here it allows us to show all the records in a layout and we're going to click on this and we're going to say, we want to see all these records in a layout that's based on invoices. So let's take Invoice List.

That way all the fields that we need are already going to be there. And also to hear something new that we haven't talked about yet in this title but the concept of a new window. FileMaker allows you to create a new window, and you can do so in any layout underneath the Window menu. Simply hitting New Window will pop up an exact copy of the window you are just in. But in this case we can click the button and specify some settings for the new window. And what it will do is pop up a new window based on the height and size that we're talking about here.

And also we can put a name in the title bar there. So I'm going to say "Invoice Items". And if hit Specify, you see I can bring this into a calculation. So let's combine some text in the field "Invoice Items for " and then of course and if we want to connect text to the field there a function and a Calculation dialog we have to use ampersand, and we'll pick the CompanyName. I'm going to say OK.

And now we can say the height of the window and the width of the window. Now we want this window to be a little smaller than the window on the background. So let's say the height will be 700x500 pixels. And that's just a guess. You can experiment with a different window sizes in Layout mode and come up with one that you like the best. And we're going to leave these options alone. Basically, this tells us how far from the corner we can space everything. We'll hit OK. And now the last decision that we're going to make here is whether or not we want to show only the related records, because right now all it will do is pop up a new window, navigate to the Invoices List, and show us all the Invoice records.

But what we want to see is only this customer's related records. So we'll say Show only related records. Now you can also choose to show all the related records for just the record that you are on at the time or if you choose this, it'll show all the related records for every parent record in your found set. So if you have a hundred customers chosen when you hit this button, it'll show you all of the invoices related to all hundred of those records. But in this case we just want one. So we'll hit OK and we're going to hit OK again, and we're going to call it Go to, let's say, Invoices.

All right, save that. Go into Browse mode. And let's see what happens. So here we've got two records. Let's hit Go to Invoices, and there we have a new window that's popped up and we can position that around if we want, but notice now if we close that window, I can say Go to Invoices. And now an Invoice window pops up that has all of this customer's related records and the customers name and all sorts of interesting info here as well as the Summary value, because here I'm just using the same layout we set up for the subsummary report back in the subsummary report chapter.

But because there's only one customer it just groups one group. But it still gives us the summaries. So I would strongly recommend that you use this for if you want to print the items in a portal. As a matter of fact, I'm going to so far as to say you should never print a portal. The main reason is because you never know how many rows you're going to need. So, for example, if I printed this portal, that's fine. There are only two records in it and same with this one's only got one. But if I print this portal then I'm going to miss out on all the data that shows up below the fold, so to speak.

So it's really just poor practice, and you don't want to have to create a portal that's so large that it would accommodate even the most massive amount of related records. Instead, just simply navigate to a layout that's based on-- simply navigate to a layout that's based on the child table and list every one of the related records and print them here. Because when you print a list view FileMaker takes care of things like page breaks, and it'll print as many pages as you need. It's a much more effective process.

And also we can change this, applying new relationships if we'd like to. For example, if we double-click on this and hit Specify and then instead say Invoices Shipped, we can then pick a Layout > Invoice List, leave everything else the same, hit OK, hit OK, and we can change this to Shipped, or we could have buttons for every status here if we want. Back in Browse mode, we hit Save, and now we hit Go to Shipped Invoices, and now we only see three.

Pretty cool stuff there! See that's the same for the next record of course. Go to Shipped Invoices, which combines our filtered multipredicate relationship along with a Go to Related Records script step. So there is a bunch of interesting things that you can do with navigating users to other layouts once you've established relationships between the tables. Allowing your users to print the contents of the portal without having to print the portal itself is just one of them.

Show transcript

This video is part of

Image for FileMaker Pro 11 Essential Training
FileMaker Pro 11 Essential Training

94 video lessons · 14873 viewers

Cris Ippolite
Author

 
Expand all | Collapse all
  1. 7m 22s
    1. Welcome
      1m 8s
    2. Understanding the FileMaker family
      2m 15s
    3. Using the FileMaker Quick Start screen
      2m 52s
    4. Using the exercise files
      1m 7s
  2. 21m 9s
    1. What is a database?
      2m 26s
    2. Flat vs. relational databases
      2m 29s
    3. How FileMaker works
      4m 48s
    4. Understanding the essential preferences
      3m 13s
    5. Touring the interface
      8m 13s
  3. 11m 44s
    1. Creating databases from templates
      2m 29s
    2. Creating new databases in the spreadsheet-like format
      5m 35s
    3. Importing tables
      3m 40s
  4. 9m 9s
    1. Determining which tables you will need
      5m 10s
    2. Creating tables in the Managing Tables window
      3m 59s
  5. 34m 47s
    1. Understanding relationship types
      6m 58s
    2. Diagramming relationships (with ER diagrams)
      8m 50s
    3. Determining which key fields you need
      5m 18s
    4. Defining primary and foreign keys
      7m 56s
    5. Creating relationships using the relationships graph and table occurrences
      5m 45s
  6. 50m 34s
    1. Deciding what fields you will need
      5m 34s
    2. Understanding field types
      7m 54s
    3. Defining fields
      9m 56s
    4. Using Auto Enter options in fields
      9m 33s
    5. Reviewing field validation options
      8m 16s
    6. Building with container fields
      9m 21s
  7. 14m 8s
    1. Creating and duplicating records
      5m 40s
    2. Editing and locking records
      4m 42s
    3. Deleting records and backing up files
      3m 46s
  8. 21m 6s
    1. Importing data
      9m 57s
    2. Importing records to refresh data
      7m 2s
    3. Exporting data
      4m 7s
  9. 18m 30s
    1. Understanding layouts
      4m 15s
    2. Using the Layout Assistant to create List views
      7m 59s
    3. Using the Layout Assistant to create labels and envelopes
      6m 16s
  10. 27m 11s
    1. Using the Layout Setup dialog box
      4m 54s
    2. Understanding layout parts
      4m 40s
    3. Understanding the new Inspector
      2m 26s
    4. Exploring the Status Area in Layout mode
      6m 46s
    5. Managing layouts and layout folders
      8m 25s
  11. 41m 9s
    1. Arranging, aligning, grouping, and locking layout objects
      11m 5s
    2. Placing and formatting objects, parts, and graphics
      4m 10s
    3. Formatting fields and applying field attributes
      8m 26s
    4. Setting field behaviors
      4m 4s
    5. Using the Tab Control feature
      9m 8s
    6. Setting tab order
      4m 16s
  12. 36m 48s
    1. Using the basic find functions
      7m 31s
    2. Reviewing new requests in the Find mode
      5m 54s
    3. Establishing search operators
      6m 43s
    4. Constraining or extending found sets
      3m 24s
    5. Finding records using date, time, or timestamp criteria
      5m 18s
    6. Using Fast Match and Quick Find
      4m 41s
    7. Working with saved finds
      3m 17s
  13. 17m 28s
    1. Sorting with one criterion
      6m 4s
    2. Sorting with related fields
      2m 18s
    3. Sorting with multiple criteria
      1m 36s
    4. Sorting using custom values
      3m 14s
    5. Sorting using buttons
      4m 16s
  14. 17m 14s
    1. Reviewing Field/Control styles
      5m 43s
    2. Creating and applying static value lists
      5m 20s
    3. Creating and applying dynamic value lists
      6m 11s
  15. 23m 52s
    1. Previewing pages and print options
      6m 20s
    2. Printing in different views
      2m 54s
    3. Sliding objects
      3m 26s
    4. Printing merge letters
      4m 53s
    5. Saving as a PDF or Excel file
      6m 19s
  16. 15m 1s
    1. Building simple reports with summary fields
      4m 36s
    2. Creating subsummary reports
      6m 51s
    3. Creating subsummary reports in Table view
      3m 34s
  17. 52m 19s
    1. Defining calculations
      2m 31s
    2. Exploring the Calculation dialog box
      5m 8s
    3. Using number functions
      12m 41s
    4. Using date and time functions
      4m 58s
    5. Using text functions
      11m 43s
    6. Using get functions
      4m 0s
    7. Using logic functions
      11m 18s
  18. 46m 56s
    1. Understanding scripts and script steps
      2m 23s
    2. Assigning script steps to buttons
      3m 54s
    3. Understanding the ScriptMaker dialog box
      8m 28s
    4. Creating multi-line scripts
      6m 44s
    5. Adding find criteria to a script
      4m 58s
    6. Understanding the If script step
      8m 36s
    7. Using script parameters
      4m 42s
    8. Reviewing the Send Mail option
      7m 11s
  19. 28m 0s
    1. Understanding script triggers
      2m 41s
    2. Using object-based triggers
      11m 58s
    3. Using layout-based triggers
      7m 51s
    4. Using file-based triggers (Open and Close scripts)
      5m 30s
  20. 56m 42s
    1. Using related fields
      7m 18s
    2. Creating portals and using portal filtering
      10m 38s
    3. Using related fields in calculations
      7m 6s
    4. Understanding multi-predicate relationships
      11m 11s
    5. Using the Go to Related Record script step
      7m 26s
    6. Creating a chart
      13m 3s
  21. 30s
    1. Goodbye
      30s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed FileMaker Pro 11 Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.