FileMaker Solution: logging usage – Part 1

At uLearnIT, we love solving your problems. Here is the latest one solved for a client using our mentoring services.

Request

In an existing FileMaker solution, we would like to know if certain scripts and layouts are being used. Over the years, the solution has been added to and updated in a haphazard manner and we would like to clean it up. How can we find out which scripts and layouts are in use?

Solution

It is unreliable and unwieldy for users to manually log their usage. Often, they do not know which scripts and which layouts they use. If they report the use of buttons, then they also have to report which screen and then the developer has to decipher the use.

The key to this solution is to automatically log the use of scripts and layouts. This can be done by triggering a script. The script will need to record the name of the layout or script used and then create a log record. The log record will be created in a special table for the purpose. The log record will have fields for:

  • item (type) – layout or script
  • name – of the layout or script
  • account – name of the account currently in use
  • creation – timestamp when created

The item will be set by the script; name will come from the script parameter; account and creation will be auto-entered.

Layout use

The script to log layout use will be triggered OnLayoutEnter – after a layout is loaded. It will pass the layout name as a script parameter that will be entered into a log record. To set this trigger for any layout:

  1. Navigate to the layout and enter Layout mode.
  2. Select Layouts > Layout Setup… and then Script Triggers.
  3. Select the OnLayoutEnter event and select the required script.
  4. Set the Optional script parameter to Get ( LayoutName )
Layout Setup – Script Trigger configuration

The script used to Log Layout Use is as follows:

New Window [ Style: Card; Using layout: “uselog” (uselog); Height: 100; Width: 100; Top: 0; Left: -1000; Dim parent window: No ]
New Record/Request
Set Field 
[ uselog::name; Get ( ScriptParameter ) ]
Set Field [ uselog::item; "layout" ]
Close Window [ Current Window ]

In the script above, the operation is performed in a card window off the user screen. This ensures that it does not interfere with the user’s normal actions or that of any running script. Since the parent screen does not dim, the user should not notice the script run. 

The script creates a new card window and goes to a layout to create a new log record. It uses Set Field script steps to set the name field with the script parameter (in this case the layout name), and the item field with the text string layout.

Repeat the layout script trigger for every layout for which you want to log use. Over time as the solution is used, the log records build an account of layout use. This can then be analysed to see which layouts are most commonly used and which layouts are rarely or not used. 

Use log for layout items

See Part 2 for scripts…

In Part 2 of this post, we will look at how to log the use of scripts in a solution. It is a simple extension of the above method for layouts.

Do you need uLearnIT to solve a problem?

We can do the same for you. Just let us know what you are struggling with and we will provide a cost effective solution. We have saved our customers hours of Googling answers and frustration trying things that never worked for them.

We can do the same for you.

Contact us now before you waste any more time!

FileMaker Solution: entering partial dates

At uLearnIT, we love solving your problems. Here is the latest one solved for a client using our mentoring services.

Request

In our Equipment table there is a field for DOM (date of manufacture). It is defined as a text field since the data is just a month and a year such as 03/10 or 11/15. We would prefer the service techs to enter the data as written. We don’t want them rejecting the process because it’s uncomfortable.

But then we need to perform simple calculations on the DOM. For example,  if the DOM is more than 5 years past, a “Level 4” service is due.

Solution

Part 1: Data Entry

It would be great to allow users to enter a month and year as the DOM in a number of ways. So let’s allow them to enter say March 2015 as any of 315, 0315, 3/15 or 03/15. And then reset the data on field exit to the standard 03/15. 

This is done with a field option which is an auto-entered calculation. Importantly, the option Do not replace existing value of field (if any) was unchecked – so that the calculation is evaluated when leaving the field.

Case ( 
Length ( Self ) = 3;
"0" & Left (Self; 1) & "/" & Right (Self; 2);
PatternCount (Self ; "/") and Length (Self) = 5;
Self;
PatternCount (Self ; "/") and Length (Self) = 4;
"0" & Self;
Length ( Self ) = 4;
Left (Self; 2) & "/" & Right (Self; 2);
"Error"
)

In this Case statement, there are four tests:

  1. if the length of the data is 3 characters, then add a leading zero and insert a slash character – so 315 becomes 03/15
  2. if there is a slash and the length is five characters, then leave as is – so 03/15 would be left as is (returns Self)
  3. if there is a slash and the length is four characters, then add a leading zero – so 3/15 becomes 03/15
  4. if the length is four characters, then insert a slash in the middle – so 0315 becomes 03/15

And if all those tests fail, it returns the result “Error”. That may happen if you enter 35 or 032015. 

Exceptions could be handled in other ways but it was not needed here.

Part 2: Calculate a proper date

Now that we have some standard data to work with, we can easily convert that into a proper date with a calculation. The decision was made to standardise on the first of the month.

So we set up a calculation field (DOM as date) using the expression:

Let ([
raw = DOM; // the field entered as MM/YY
themonth = GetAsNumber (Left (raw ; 2));
theyear = GetAsNumber (Right (raw ; 2));
theyear = theyear + 2000 - If(theyear >50; 100);
// convert to four digit
thedate = Date (themonth ; 1 ; theyear)
// date of first of month ]; thedate )

The process in the Let statement is:

  1. The field (DOM) is set into a variable called raw.
  2. Then raw is processed to get the month and the year – first and last two characters respectively. 
  3. Then the month and year are used to get the date of the first day of the month.
  4. The year is converted into four digits.
  5. The Let function returns the proper date (calculation result type is date)

QED

So that is the simple solution that lets techs enter the date quickly and easily, and then use it to move forward into other calculations to work out service requirements and more.

Do you need uLearnIT to solve a problem?

We can do the same for you. Just let us know what you are struggling with and we will provide a cost effective solution. We have saved our customers hours of Googling answers and frustration trying things that never worked for them.

We can do the same for you.

Contact us now before you waste any more time!

FileMaker 17 – UUID number

FileMaker Pro 17 has a new function for generating universally unique identifiers – Get(UUIDNumber). Why would you use it? Read on.

UUID

A universally unique identifier (UUID) is designed to be limited to one instance of that specific string in the entire world past, present and future. That means that if a million monkeys generated one UUID a second for the next million years, no two UUIDs would be the same.

While the probability of no duplicates is not zero, the likelihood of duplicates is so close to zero that it might never happen in any one system. So you can create UUIDs to uniquely identify objects such as records in a table, and know that each UUID will be different to every other existing and future record in that table (and every other table).

Types of UUID

There are standards applied to the generation and structure of UUIDs. At their heart, they are a 128-bit number but may be represented as 32 hexadecimal (base 16) digits in 16 pairs. An example is:

16776D83-EBE1-4AD8-B131-51AFB7E33E1D

There are many variants of UUID in use. The Get(UUID) function in FileMaker Pro has been available since version 12. It generates a version 4 UUID using a random number seed.

Uses of UUID

It is common practice to generate a UUID for primary key data in a table. This will mean that all records can be uniquely identified as is needed in a relational database structure. You can read more about how to do this in the previous post The A-Z of FileMaker: G is for Get.

A UUID could also be used as a unique access identifier. You could create a calculation field using a UUID function. Then select Do not store calculation results in the Storage Options. Every time a record is accessed, a new ID is generated.

So why the new UUID in FileMaker Pro 17?

FileMaker Pro 17 introduces a new UUID – Get(UUIDNumber) – which returns a unique, 24-byte (192-bit) number. An example is:

4834366009124897899475462287919682524896572646284376517480

This has been added specifically for the generation of primary key data. Since it is a pure number, it has been shown to improve relational performance. When using Get(UUID), the primary key field must be a text field;  with Get(UUIDnumber), the primary key field is a number field.

Interesting Fact

Number fields have smaller indexes than text fields

FileMaker Pro 17 creates a number of default fields in a new table. One of these is called PrimaryKey and is configured as a text field with an auto-entered Get(UUID) value. You may want to change this to a number field and use the new Get(UUIDnumber) function.

Compatibility Warning

If you are going to use the new Get(UUIDnumber) function, ensure that only FileMaker 17 clients access the database. You can do this in File > File Options… and set the Minimum version allowed to open this file to 17.0.

If you open a file that uses the new function in a version previous to 17, the function will appear as Get ( <Function Missing> ). And it will return a ? result when triggered.

Searching FileMaker – calculation and summary fields

In our last post of this series, we looked at how time and timestamp searches work with the FileMaker search engine. In this post, we will consider searches in calculation and summary fields.

Calculation fields

A calculation field is defined with an expression and a result type. The expression is similar to a formula in a cell in Excel. A FileMaker expression can contain:

  • field references (from the current or related tables)
  • functions (pre-defined in FileMaker Pro)
  • operators (mathematical, text and logical)
  • constants (numbers or strings)

The expression is constructed in a calculation dialog with access to fields, operators and functions. FileMaker Pro provides a typeahead feature making it easier and faster to include fields and functions – just start typing and FileMaker will suggest options.

calculation typeahead

When creating a calculation, it is important to specify the data type of the expected result. this is set in the lower left of the dialog:

calculation result

The result type will affect search results on the field. Searches will treat the data as the defined type. For example, if you create a calculation field for a full name (first name & ” ” & last name) and the result is number, searches on the full name field will not return expected records.

Also in this area is the setting for Storage Options…. This allows for the calculation result to be stored or unstored:

calculation storage

Annoyance

This is one of the times that FileMaker presents a double-negative option in a dialog. Unchecking the Indexing option means “Do not not store the result” – it will be stored. The option should really read “Store the calculation result” – check for stored, uncheck for unstored.

If a calculation result is stored, the field can be indexed and this can improve search performance on the field. However, that may be at the expense of a larger file for both the data and the field index.

It may not be possible to store the calculation result. This is so if the expression references a related field, a summary field, another unstored calculation field, or a field with global storage.

Searching calculation fields

Calculation fields can be searched just like most other fields. As stated above, searches treat the calculation field as the defined type of data. A search on a calculation field defined as a date result will search as for dates (see the previous article on date searches).

If the calculation result is unstored (either by choice or necessity), searches including that field may be slower because there is no field index available and all results must be calculated first to be searched. However, except where there are very large sets of records or the calculation is complex, the FileMaker engine is quite efficient and fast to return a result.

As with standard container fields, a calculation field with a container result is not searchable.

Summary fields

A summary field provides an aggregate summary of a set of records for a specified field. For example, it may display the average test score for a set of test result records.

summary field average

Searching summary fields

Since the result in a summary field is for a specific set of records, it doesn’t make sense to search a summary field. There is no access to a summary field in Find mode.

NEXT UP

In the next post in this series, we will look at QuickFind and field indexing.

FileMaker 17 – grouped objects

Objects on a FileMaker layout can be grouped to make it easier to move them around and to maintain relative positions of components.

Group and Ungroup

To group a set of objects, select multiple objects and choose Arrange > Group (Cmd/Ctrl-R). The group can be selected with a single click.

To ungroup, select the group and choose Arrange > Ungroup (Cmd/Ctrl-Shift-R).

grouped objects

Objects Tab

In FileMaker Pro 17, the Objects tab (formerly the Layout Objects floating panel in FileMaker Pro 16) displays the group with a disclosure triangle to show items in the group.

objects tab group

As with all objects, the group can be given a name (rather than the default “Group”). Do this by right-clicking the name and choosing Specify Object Name.

Items in a group may be dragged up and down (changing their z-order or stacking order). But objects cannot be dragged in or out of a group.

Working with objects in a group

Then

In FileMaker Pro 16, it is possible to select an object inside a group on the Layout Objects panel, and then:

  • apply formatting via the Appearance tab of the Inspector,
  • apply a style from the Styles tab, or
  • change settings on the Data tab (field, behaviour, data formatting)

Multiple objects within the group can be selected in the Layout Objects panel using Cmd/Ctrl-click.

This was a big step forward in FileMaker 16 with the new Layout Objects panel. In previous versions, there was no access to objects in a group – the group had to be ungrouped, edited and then re-grouped.

Now

In FileMaker Pro 17, individual object access has been made easier. While you can still select an object through the Objects tab, you can also directly select an object in a group. Simply click to select the group, and then click the object. There is a dashed line to indicate the group. Multiple objects in the group can be selected.

selected object in group

Also in FileMaker Pro 17, when an object in a group is selected, it can be both resized and repositioned. If it is moved outside of the existing dashed line bounds, the group is enlarged. Effectively, options on the Position tab of the Inspector have been provided for selected group objects.

These new features in FileMaker 17 makes it much easier and quicker to work with objects in a group. No more Ungroup – Edit – Group.

And a subtle change…

When selecting objects in the Objects tab in FileMaker Pro 17, there is a light grey highlight as you hover over the object, and then a dark grey highlight when you click to select it.

objects tab hover select

If you select an object directly on the layout, it is selected in the Objects tab with a light grey gradient fill.

objects tab direct select

Why is this important? It probably isn’t  🙂 Back to work now.

 

FileMaker 17 – products and licensing

With the release of the FileMaker 17 Platform, FileMaker Inc., has taken the opportunity to simplify the licensing model and the products on offer.

Products

The FileMaker Platform consists of the following products:

  • FileMaker Server
  • FileMaker Pro Advanced
  • FileMaker Go
  • FileMaker WebDirect
  • FileMaker Data API

Each licensing model provides all products. There are differences between the models in how many servers are included, the client connections available, and the data transfer limits via the API.

Licensing models

There are three licensing models:

  • User license (UL)
  • Concurrent license (CL)
  • Site license (SL)

For convenience, we will refer to these by the two letter acronyms above.

Each model can be purchased on an annual or perpetual basis. Annual licensing is most common and convenient – just pay the renewal each year or uninstall. Perpetual licensing requires renewal each year – if you do not renew, you can use your current version in perpetuity but no upgrades are available.

What products are included?

  • UL includes all clients for all users and three (3) server installs.
  • CL includes all clients for all connections and one (1) server install.
  • SL includes all clients for all seats and one server install per seat.

Starting points and usage

Both UL and CL start from five (5) licenses. And you can add any number of licenses, one at a time. There are price breaks (less per license) when the total licenses reaches 10, 25, 50 or 100. SL starts from 25 seats.

  • UL: a user is defined as a unique person who will access FileMaker Solutions using any FileMaker client
  • CL: a concurrent connection allows access to FileMaker Solutions using any FileMaker client
  • SL: a seat is any staff member of the licensing organisation, whether they use FileMaker Solutions or not.

For all licensing, FileMaker Pro Advanced can only be provided to users within the licensing organisation.

For CL and SL (but not UL), anonymous users (e.g. customers) can access hosted FileMaker Solutions using FileMaker Go and FileMaker WebDirect.

For annual UL and CL, one server can be installed on FileMaker Cloud (AWS). For annual SL, any number of servers can be used on FileMaker Cloud.

For outbound API calls, all models provide 24GB of data transfer per year per user/concurrency/seat (inbound API calls are not limited). This data is conveniently pooled for the license. So for the minimum 5 user UL or CL, there is 120GB (24x5GB) available per year. Additional data can be purchased.

One FileMaker Pro client

FileMaker Pro is the desktop client that runs on macOS and Windows. In FileMaker 16, there were three FileMaker Pro clients:

  • FileMaker Pro
  • FileMaker Pro Advanced
  • FileMaker Pro for User Connections

In the FileMaker 17 lineup, there is now just one:

  • FileMaker Pro Advanced

Accessing advanced features

The advanced features include tools such as the Script Debugger and Data Viewer, and access to manage Custom Functions and Custom Menus.

When FileMaker Pro Advanced is installed, no advanced features are available. These features are simply turned on by checking the checkbox for Use advanced tools within the Preferences (General > Application) and then restarting the application.

FMPA17 Prefs

Purchasing

As shown above, FileMaker Pro Advanced is included in every licensing model. It can also be purchased as individual licenses through the FileMaker Store. Upgrades are available from versions 14 (limited time), 15 or 16 of FileMaker Pro or FileMaker Pro Advanced.

User connections

If FileMaker Pro Advanced is installed using an individual, UL or SL key, accessing a hosted FileMaker Solution will not use a concurrent connection. If it is installed using a CL key, it will require and use a concurrent connection on the server.

Simple?

Believe it or not, this licensing is simpler than it used to be. There are some other licensing options that are only available through FBA developers or directly through the FileMaker sales team. And there are some complications if you start mixing UL and CL.

If you have any questions, uLearnIT is happy to discuss your situation or you can call your local FileMaker sales team.

FileMaker 17 – Layout mode

A major interface change for FileMaker Pro 17 is in Layout mode. You now have docked Inspector, Field Picker and Objects panels.

v16 HUDs

In previous versions of FileMaker Pro, these were HUDs (heads-up displays) that floated over the top of your layouts. They could be moved around to suit your development process.

Layout Mode 16
FileMaker Pro 16 with floating HUDs

v1Docked Panels

In FileMaker Pro 17, these are now docked panels. The Fields and Objects are on the left; the Inspector is on the right.

Layout Mode 17
FileMaker Pro 17 with docked panels

Keyboard Shortcuts

The keyboard shortcuts to view/activate and hide the docked panels are as follows:

  • Inspector – Cmd/Ctrl I
  • Fields – Cmd/Ctrl K
  • Objects – Cmd-Option T or Ctrl-Alt-T

In addition, there are shortcuts for selecting the tabs of the Inspector:

  • Position – Cmd/Ctrl-1
  • Styles – Cmd/Ctrl-2
  • Appearance – Cmd/Ctrl-3
  • Data – Cmd/Ctrl-4

An Inspector option

If you still want the floating Inspector, it is available. You can close the docked Inspector panel (or leave it open as a second option). And then get a new Inspector from View > Inspectors > New Inspector.

Addition to the Field Panel

The new Field panel has an addition – the ability to set the Control Style for a dragged field. This is found at the bottom in the Drag Preferences.

Field Panel Drag Prefs

So you can specify say a Checkbox Set, and drag a field onto the layout. Then you would need to select the value list to be used from the Data tab of the Inspector.

FileMaker 17 – variable inputs

Another great new feature in FileMaker Pro 17 is a new way to set variables – through a custom dialog.

Show Custom Dialog

This script step allows a script to interact with the user, providing feedback and allowing input. The script step options provide two tabs – General and Input Fields:

SCD general

SCD inout

When input fields are used, these are presented on the custom dialog for user input. The field can have a label (static or by calculation) and can be presented using password bullets to obscure input.

SCD passcode

Before FileMaker 17

The problem before FileMaker 17 was that the input from these custom dialogs was limited to a field. Depending on the use case, FileMaker developers create global fields for the purpose of storing custom dialog input. While these fields could be in any table, they still needed to exist in the schema and be managed.

When clicking the Specify… button for an input field in FileMaker Pro 16, the only option is for a field:

SCD specify field 16

Example

Here is an example of a script in FileMaker Pro 16 that allows a user to reset their account password.

Reset account password 16

It presents a custom dialog (line 4):

Reset account password dialog

The user input is stored in repetitions of a global field (password_g). These are checked to ensure that the passwords match exactly (line 8). If so, then the account password is reset using one of the global field values (line 9).

Importantly, all global field values are cleared at the end of the script (lines 20-22). These will be cleared at the end of the user session but, for a number of reasons, they should be explicitly managed in the script.

New in FileMaker 17

The same Specify… button in FileMaker Pro 17 provides the choice to specify a field or a variable.

SCD specify target 17

Notice the subtle difference in the title – Specify Target. Note also that FileMaker has added the ability to search for a field if you are using that.

Now there is the ability to enter a variable name (either local $ or global $$) that will be used as the target for user input.

The Repetition applies to either the field or the variable that you specify. However, if you want to use a repetition for a field, it must be defined in the field options.

limitation

This is minor – the variable name must be hard-coded. There is no option to calculate the variable name through a Specify button. This is the same as when a variable is set using Set Variable. In both cases, it would be useful to be able to set a calculation to specify the name of the variable to use.

Example

Here is a modified example of the script for FileMaker Pro 17 that allows a user to reset their account password. The custom dialog presented is exactly the same.

Reset account password 17

Note that variables rather than fields are being used in lines 2, 4 and 9. And there is no need to clear the variables at the end of the script – local variables are used that disappear when the script ends.

Backwards compatibility?

Obviously, there is no backwards compatibility for this FileMaker 17 feature. If you open the above script in FileMaker Pro 16, you will see <Table Missing> in the Show Custom Dialog step (line 4).

So what?

Why is this a great feature for FileMaker Pro 17? It allows the FileMaker developer to remove global fields from the schema since custom dialog input can be handled through variables. And, unlike global fields, local variables are self-managing – they disappear at the end of the script in which they are used.

New Feature Request

While this is a great new feature, we might need another one – a layout object that can be used to set a variable. This would probably look like a standard edit box (field) and provide all the same options for presentation and input like using value lists.

The reasoning here is that FileMaker developers need more flexibility with dialogs than is provided by Show Custom Dialog. Developers are using card windows for user dialogs. This allows them to specify dialog size and position and to use any number of layout objects in the dialog layout. However, this currently means that values can only be set in (global) fields. A layout object that sets a variable would be great!

If you like this idea, you can go to the FileMaker Community and vote for it:

Layout field input into variable

Searching FileMaker – time and timestamp

In our last post of this series, we looked at how number and date searches work with the FileMaker search engine. In this post, we will consider searches in fields defined as time or timestamp.

Time fields

A time field can store a time of day or a duration. Behind the scenes, times are treated as the number of seconds since 0:00:00. This greatly aids their use in calculations such as adding a period to a start time, or determining the difference between two times.

Time Maths

When subtracting one time from another, the result will be given in seconds. To convert this to minutes, use calculations like result / 60 or Div ( result; 60 ).

Time data is entered with a separator character between the hours, minutes and seconds. This is usually a semi-colon (:) but is dependent on the file system formats.

If you enter a simple number into a time field, FileMaker Pro will see that as a number of hours e.g. 3 is 3 hours or 3am, 16 is 16 hours or 4pm. If you need to enter one minute, you should enter 0:01 (or 0:1).

INTERESTING FACT

If you enter an invalid number of minutes or seconds (over 59), FileMaker Pro will accept the entry and display the time correctly. For example, if you enter 1:99:99, FileMaker Pro will display 2:40:39. The entry for 99 seconds has become 1 minute 39 sec; the entry for 99 minutes has become 1 hour 39 minutes. All totalled with the 1 hour gives 2 hours, 40 minutes, 39 seconds.

Time fields can be formatted to display the time entered in a wide range of formats.

Time searches

When searching time fields, simple numbers are considered to be a number of hours. FileMaker Pro constructs a wildcard search. If you enter 4 in a time field of a find request, FileMaker Pro will search for 4:*:*. So the search will return all records with a time of 4 hours and any number of minutes. You can also search for times within a specific hour of the day such as 5pm – this finds all times between 5:00:00pm and 5:59:59.999999pm.

Time fields will accept range searches using the ellipsis (…). So you could search for all records between 4:15 and 4:30 using 4:15…4:30.

Time fields also accept the comparison operators:  >  <  ≥  ≤  as would be expected.

A time search will not accept # for a missing digit (e.g. 4:5#).

Timestamp fields

Timestamp fields store a date and a time combined. When entering data, you must enter both a valid date and a valid time (in that order). Timestamps are usually populated with auto-entered values (field options or a script step to Set Field).

If used in calculations, FileMaker Pro converts the timestamp to the number of seconds since 01/01/0001 0:00:00. As for times, simple maths can be performed on timestamps. Just remember to convert results from seconds into something more useful.

Timestamp fields act like a combination of a date and a time field.

Timestamp searches

Timestamps can be searched for dates, times or both. All the rules for date and time fields apply.

NEXT UP

In the next post, we will look at searches in calculation and summary fields.

FileMaker 17 – attach more

With the release of FileMaker Pro 17, a long-time feature request has been delivered – the ability to attach multiple files to an email.

Send Email

The Send Mail script step is used to compose and send an email from a FileMaker solution.

Send Mail 17

The change in FileMaker 17 is the Attach Files button in the lower left. Clicking this button allows multiple file paths to be set:

Send Mail path 17

Developers will usually specify a variable to define the file path. In past versions, this would have been a single path ending in a file name. In FileMaker 17, the variable can be a list of file paths, one for each attachment.

Attaching Multiple files to Email

So a script to send invoices for a current customer record looks like:

Go to Related Record [“Invoices”; only related]
If [ Get ( LastError ) = 0 ]
  Go to Record/Request/Page[First]
  Loop
    Go to Related Record [ “Invoice Data”; 
                          only related; new window]
    Set Variable [$FILE; Value: calc below]
    Save Records as PDF [ File Name: “$FILE”]
    Set Variable [$LIST; Value:List($LIST; $FILE)]
    Close Window [Current Window]
    Go to Record/Request/Page[Next;Exit after last]
  End Loop
Send Mail [ E-mail Client; Attachments: “$LIST”]
End If

The $FILE variable is set with a calculation like:

Let ([ path = Get ( TemporaryPath ) ; 
       file = "Inv_" & Invoices::Invoice ID & ".pdf"
     ];
       path & file
    )

This value is used as the file name for Save Records as PDF. Each PDF will have a unique name and will be saved in the temporary path.

The $LIST variable is used to assemble all the file paths for the attachments. It is ultimately used in the Send Mail step. It appends each new file to a list for each loop using:

List ( $LIST; $FILE )

Backwards Compatibility

As with all new features, it is important to account for users who may not be running version 17 clients. Either the file needs to lock those users out, or the script needs to detect the client version and have  modified action.