Using get functions

show more Using get functions provides you with in-depth training on Business. Taught by Cris Ippolite as part of the FileMaker Pro 11 Essential Training show less
please wait ...

Using get functions

Get Functions are a rare breed of function because they pull environmental information, either about the session that you're in, the application that you're using, or information from your operating system. It can be really helpful if you need to extract this type of information for calculation fields, or even within your scripts. Let's take a look at how this function works. Go to File > Manage > Database, you see we've got a GetCalc function. We'll hit Options, and we'll clear out the values that we see inside the field. Now, let's take a look at the Get Functions.

See here, they're all grouped together, and these are pretty easy to understand. They only have one parameter, and they'll pull information from your operating system, or in this case from FileMaker, so we've got some session-based ones here I'll show you first. First, Get (AccountName) will simply extract the name of the user's account that's logged into the FileMaker Pro database. So, that's based on session, and we can pull information from your computer, for example, Get (CurrentDate) will pull information from the operating system and whatever your clock setting is at that time. Same with some of these that will do -- Get (GetCurrentHostTimeStamp) will pull the timestamp from the FileMaker Server that's hosting the file. CurrentTime, CurrentTimeStamp, same kind of thing there.

You could even get Paths, if you want. You can get the path between your copy of FileMaker Pro and your Documents folder, which helps you when you're creating locations to save things, for example, If we look at one called Get (FoundCount), that also pulls some information from our session. We'll use this one in our example and we'll change it to numbers, since it's going to give us a numerical value of how many records are in our Found Set. Also, this one will take into account Storage Options. You see this button over here. We haven't talked about it yet, but every calculation can either be stored or un-stored.

Really, what that means is once you create the calculation, if you decide to store the value, that means that at the moment that you created the calculation, it's going to evaluate whatever it is that you've told it to evaluate, and it's going to keep that result in there, in perpetuity. However, if you choose to not store results, that means it's constantly in this state of evaluation, and if any of the factors that are inside the calculation change, then it will change as well. Most of the time you're going to want to keep your functions not stored.

But if you want to use them in a relationship, or as a key field, or if you want to index them or something like that, they can't be stored. So, that's why you wouldn't normally have every single one of them in there. So, that's something to pay attention to. So, if we hit OK, and OK, you see we've got the GetCalc result appearing here in Browse mode. We've got 1,523 records in our Found Set. But let's modify our Found Set. You see, now, we've got 26 records up here, and 26 records below. Now, if this was a stored calculation, then it would still say 1,523. We'll do just another example here, by modifying our GetCalc.

Let's go to Get Functions, and you can see things we can do like Get (LayoutName , Get (PrinterName), different things like that, all sorts of information that might be helpful for you to use. Especially in scripts, if you want to check some environmental factor and determine which way you're going to go with the script or an action from there, that's where Get Functions come into play. But let's just pull in ApplicationVersion. This one is actually going to read what version of FileMaker Pro we're using at the time.

You see, here it gives us Pro 11.0 Version 1. So, if you ever need to pull information about your FileMaker application, anything within a session, the components of FileMaker, your window environment, layout, operating system stuff, anything like that, these are great tools. In this movie, we've been focusing on the core Get Functions, but it's best become familiar with these functions without needing to have to keep referring back to the function list as a source. Get Functions are pretty easy, since they've only got a single parameter, but the more you get familiar with what types of things you can extract using a Get Function, the more useful these will become to you.

Using get functions
Video duration: 4m 0s 9h 11m Beginner


Using get functions provides you with in-depth training on Business. Taught by Cris Ippolite as part of the FileMaker Pro 11 Essential Training

FileMaker Pro
please wait ...