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

Creating portals and using portal filtering

From: FileMaker Pro 11 Essential Training

Video: Creating portals and using portal filtering

So far in this chapter, we've been talking about relationships. We've discussed using relationships between the parent and in the child table in order to borrow related fields. If you haven't watched that movie yet, I would recommend that you go back and watch that movie because this one is going to be kind of continuation of that concept. So, we've looked at how we can place related fields on a layout, so that a child table can borrow values from another related parent table, thus eliminating the need for redundant data in your database. This, of course is one of the true values of having a related database system.

Creating portals and using portal filtering

So far in this chapter, we've been talking about relationships. We've discussed using relationships between the parent and in the child table in order to borrow related fields. If you haven't watched that movie yet, I would recommend that you go back and watch that movie because this one is going to be kind of continuation of that concept. So, we've looked at how we can place related fields on a layout, so that a child table can borrow values from another related parent table, thus eliminating the need for redundant data in your database. This, of course is one of the true values of having a related database system.

However, we've only been looking at using related fields from the context of the child table. So, for example, in the Invoice Detail, we've got all these related fields added to our layout. Well, what about if we are on the parent? Can we borrow related fields from the child? Well, let's see what happens when we use related fields from the context of the parent. If you open up our Exercise File and navigate here to the Customer Detail. Let's go into Layout mode. You'll notice that we have a Tab control here, and we are going to click on the one called Financial.

So, let's try, applying the same method for using related fields on this layout, as we had in the previous movie. But remember this time we are the parent or the one side of the one-to-many. Before, we're on the child or the many side of the one-to-many. So, if go on and insert a field, and we get the Specify Fields Window. You see we can choose from many related tables, and we are going to choose Invoices because that's the child in this relationship. Since Customers has a relationship to Invoices, we are going to select _pkInvoiceID.

If you recall from when we define these fields, this is the naming convention that indicates the unique serialized value in the Invoice table. So, what we are going to get is a unique Invoice ID. So, we hit OK and let's move this one down over here. Now, let's see what happens when we go into Browse mode. Save our changes and go into Financial. You see that we do actually see a value in this field. So, what does this mean? Well, if you think of it, this field value isn't meaningful.

I say it's not meaningful because there are potentially many related values in the child table. So, in English that means that this contact at Radley & Friends could potentially have hundreds of different invoices that they are related to. But since the FileMaker field can only display this one piece of data, all we are seeing is one of them and that really is born out of the fact that we are in the parent context. So we are in the one, and it's related to many and a field can only show one. So, really a normal field is not the right mechanism for us to be able to show related data because of the context that we are in right now.

This is an important concept. So, what we really need is a special type of a field or maybe a different kind of a layout object that allows us to see many different iterations of a field, possibly one for every related value that we have in the child table. Well, we actually do have a special kind of layout object. If we go into Layout mode and back into the Financial tab, I'll show you. If we go into the Layout Tools, you see right here we've got a tool called the Portal tool.

When I click on it, looks like many other layout tools. I can drag an area on screen and release and up pops something called the Portal Setup. Now, right away you can see as we are looking at it we've got multiple rows. So, really it's kind of like having one related field, but the field will repeat itself for every related record that it has. So, that way if we have 10 different related invoices, each one of them can have their own row. So, this is perfect.

This just what we need. We will take a look at how we set these portals up though first. First, we are going to choose related records from and in this case, we have to choose from whatever table the Customer table is related to. The reason is because we are in the context of Customer. This layout is based on Customer. As you can see here Current Table ("Customer"). So, we were looking to display values from the child table or the Invoice table, so we'll keep that selected. You see that we've got a couple of options here.

The first one is the Sort portal records, which means when we are on this layout, viewing related records in this portal, how do we want them to sort? Well, let's click that, and we see the familiar Sort Records dialog. So, let's say we want to view them by InvoiceDate. So, InvoiceDate in ascending order, meaning the very first invoice to the last one from top to bottom and we hit OK. Now, this next option we are going to get back to this. This is a pretty big deal. This is new in FileMaker 11, but we'll get back to that one.

A couple of these. Do we want users to be able to delete portal records? Well, what that means is that if you click on one of these rows and hit your Delete key then you're going to actually delete the invoice record in the Invoice table. Sometimes that make sense to do that, but we are going to leave that off for right now. How about we do a little cosmetic thing here. Show a vertical scrollbar. That way we can have 11 rows, but if there's 30, then they can just scroll. So, that way we don't have to make that thing any bigger. The way that we determine how many rows it is initially is by filling in this information here.

The initial row is going to be the first related record, and it's going to show us 11 total related records. If you want to get kind of fancy with it, you can have one portal that shows invoices, related invoices 1-10, and another one that shows 11-20, so on and so on. But we'll just keep it standard for right now. Also, there's a cosmetic thing here. You can choose to alternate the background fill between rows to make it easier to read. Well, let's hit OK and now the next window is asking us what related fields do we want to put on there? Because, for example, we already tried to put the InvoiceID on there, but it didn't really seem to make sense.

So, let's put that in our portal now. Let's take the InvoiceID. And what else might be helpful for us to see? How about the InvoiceDate and maybe InvoiceTotal and how about ShipmentStatus? So, now we've chosen all the fields from the invoice that we want to see in a list. It's going to create a little List View for us here. So, all those fields are going to be put into this first row and then they'll be iterated for every related record. When we are done, we hit OK. Now, you see that we've got only the first row highlighted here.

What's important is that you'll notice that we don't have to put these fields in every row. What's nice about setting up a portal is you can pick the related field that you want to see in a portal, but you only have to place them on that first white row there. That's sort of like your staging area. But you have to make sure that the fields fit with in that row. FileMaker automatically puts those in there for you. But if yours are even nudged up just a little bit like that, it's not to going to work properly. So, you got to be careful about your sizing there. So, now that we have our portal on the layout, let's go into Browse mode,and we can save our changes and click over to Financial.

If we scroll through, we can see all the different related invoice records. We notice, we got a little squirreliness with the line there, but if we go back into Layout mode and hit Financial, we'll see that that's because I moved this field. So, let's go in here and Shift+Select all these, go into our Position and lock them. What's one way we know to get them all in line. Well, select the one that's not in line and of course choose Align. So, here's a perfect example of making sure that everything is on the line properly.

I am going to Browse and save our changes and back into Financial. Now, we see all the different related invoices. So this record here has several of them. If we go to the next record, we see it only has one related. This has two related and so on and so on. So, these portals will update as you navigate to a different parent record. So, this becomes very helpful tool and if while we are looking at this record another user who's logged into this database goes in and creates a new invoice for this contact, it'll automatically show up in this portal the second that they commit the record.

So, we go back into Layout mode. There is something that's new in FileMaker 11 that I wanted to show you. If we go back in to the portal and double-click on the portal, that'll bring up our Portal Setup. You'll notice that we have this option to Filter portal records. Well, it has a Specify button, so we know when we click on it it's going to bring up the Specify Calculation dialog. So, here we are going to put in a calculation that's going to be Boolean, which means something is either true or false.

So, any record that is true based on this condition we are going to enter is going to show up in the portal, but any records that's false will not. So, it's just a way that we can visually filter this portal. So, let's say in this case we want to say anything that's shipped we don't want to have show up in here, because otherwise this list can get really long. So, let's say ShipmentStatus="Shipped". So, this way we only see the ones that are shipped. Now, I hit OK and OK again and back in Browse mode.

Now, we see none of these records have shipped, but here we have three records that have shipped. So, it's a same portal, but these are the only ones that we see that have shipped in this group. We can go in and maybe even make the inverse, if we'd like, to filter portal records. How about we say anything that does not equal shipped, so anything but shipped. Hit Save, and now we see all of these are processing. You see that status there,. Processing, Processing.

So, basically nothing that has the status of Shipped that will show up here. So, the Portal filter is brand new in 11. It's a great feature. But keep in mind that if you have the same portal on another layout, it's not going to affect the relationship. It's just going to affect this particular portal. It's a nice option for adding multiple portals to the same layout, if you want to. One of them can show all of the related invoices. The one next to it, or maybe another tab let's say, can show all of the shipped ones. Another one can show all the processing ones and so on. So, understanding portals is really going to be one of the layout tools that you'll have to have in your FileMaker toolbelt so to speak that will help you most when you're designing layouts in a parent table.

It provides extremely useful visibility of child records from the context of the parent. It's going to be something that you use on almost every database solution that you create.

Show transcript

This video is part of

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

94 video lessons · 14898 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.