- 40 Views
You can use different methods to achieve the same result when developing software with FileMaker Pro and Claris Pro. Most of the time the result will be the same, but knowing the nuances between alternative methods can add benefits in terms of performance, reliability, and practicality.
In our Mini Claris FileMaker Training, where we examine the detailed features of Claris FileMaker Pro, we held a session to answer questions such as "Which method can we use? What are the differences between them?" under the title "This or That?" in 12 points this week.
Watch our video for detailed information and application examples. For a brief summary, we have explained our 12 points below.
Auto Enter or Lookup
We often use Lookup, a very old feature of FileMaker, to bring data from a related table (e.g. when you select a product code, the product name, product price, etc. information is automatically retrieved). With the innovation that came with the auto-enter calculation feature in FileMaker 7, we have the opportunity to use auto-enter instead of Lookup, and thanks to the Calculation Engine (calculation engine) working in auto-enter, we can do much more. This does not mean that we will completely abandon Lookup, as the options "copy next lower value" or "copy next upper value" are nice features of Lookup for records that match one to one. With auto-enter, you can handle a task that you could do with much more effort with a single radio button selection.
Auto Enter or Calculation
The Auto Enter feature, which was introduced with FileMaker 7, also comes into play with a Calculation type field. Calculation fields are also one of the great features of FileMaker, but in some cases, using auto-enter can enable the data in the related field to be indexed. In addition, while calculation fields are definitely closed to user intervention, fields that use the auto-enter feature can offer flexibility under certain conditions. In our mini training, we made an example of the triplet Quantity / Price / Amount; you can either write the price and have the amount calculated, or enter the amount and have the unit price calculated.
Summary or Sum
Summary is a field type, the other one "sum" is a calculation function. While we do not expect very different results in terms of performance, the "sum" function provides a better user experience (UX) in active data entry layouts. Summary fields are essential in sub-summary reports. By the way, we would like to add a nice reminder here during our mini training: a summary field is not just about doing "sum". You can produce any kind of summary information; sum, count, average, min, max, standard deviation, list, and fraction of total with summary type fields.
Set Variable or Insert Calculated Result
A good method to use when defining variables in FileMaker Pro or Claris Pro. While it may be practical to write "Set Variable" when writing a script, FileMaker finds "Insert Calculated Result" more practical. You will not notice the difference in most uses. Setting variables that update their own value and contain large amounts of data with Set Variable will be much slower than setting them with Insert Calculated Result.
For details on this performance tip, see mrwatson's article on the FileMaker Community.
Copy & Paste or Duplicate
This may be the most enjoyable "This or That?" item in this mini training. Using Copy & Paste instead of the duplicate command to replicate multiple FileMaker elements (in this example, field, script, or custom function) will also automatically update the relationship between elements. You can watch an example in the video.
If or Case
It is very important to be organized when maintaining your Claris FileMaker projects. Many nested If statements can be simplified with a single Case function, which is enough reason for us to love Case more.
Clipboard or Variable/Global Field
In the projects we support (particularly older FileMaker 6 and earlier), we see the use of the "Copy" and "Paste" commands for copying/moving data between fields/screens. In newer versions, you can create your own clipboard by using variables, so as not to overwrite the user's data on the operating system clipboard.
Export or Save as Excel
Although it may seem that Export Records and Save as Excel perform the same operation in FileMaker, each has its own hidden features in the details. For example, Save as Excel is more successful for saving repeating fields as Excel, while the Export Records command with the "Group by" option is a more practical solution for saving a summary report as Excel. You can watch the relevant section in the video for these small details.
Delete All or Truncate
One of the innovations in Claris FileMaker 18 was the Truncate Table command. It performs much faster than the Delete All command, but if you want the records to also automatically delete the relationships, you will need to use Delete All.
Loop or While
If you are new to FileMaker, knowing the basic differences between Loop and While can be useful in understanding which one to use in different situations. The syntax used to create loops in different programming languages is often for each, loop, or while. In FileMaker scripts, the loop command appears as Loop. In FileMaker 18, the second loop command, "While", was introduced, but the most basic difference is that Loop is a script step, while While is a function. We briefly covered the differences in a mini-training. For more detailed information on While, you can access the mini-training video recording we published previously.
Filter Portal or Relational Filter
One of the purposes of using relationships in Claris FileMaker is to filter records displayed in a portal by certain criteria. In FileMaker 11, a second filtering option was made available in the portal options. Portal filtering makes it easy to do filtering that would take much longer through the use of the calculation engine, but filtering through a relationship will work faster because it works with "indexed" fields and only brings back records that match the query.
Exit After Last or Exit Loop If
In scripts where you use a loop, you can set the loop termination condition by simply checking a box (Exit after Last) with the Go to Record or Go to Portal Row script. However, in some cases, this may not work. In this case, the Exit Loop If script command will come to your aid.
Download link sent to your email address