Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
FM.SQL.Min
Queries min value in a record set.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| FM | 9.1 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| SQLref | The reference number returned by FM.SQL.Execute function. | $SQLRef | |
| Column | The index of the column. Default is 0. |
0 | |
| firstRow | The index of first row. Default is 0. |
0 | Optional |
| lastRow | The index of last row. Default is FM.SQL.RowCount-1. |
5 | Optional |
Result
Returns number or error.
Description
Queries min value in a record set.You got a record set in memory and we can walk over a column in a given row range to find the minimum value.
Examples
Query once and make several calculations:
# let FileMaker query data once
Set Variable [ $Records ; Value: MBS( "FM.SQL.Execute"; Get(FileName); "SELECT Price FROM Produkte") ]
# Now get sum, min, max and avg
Set Variable [ $sum ; Value: MBS( "FM.SQL.Sum"; $records; 0) ]
Set Variable [ $min ; Value: MBS( "FM.SQL.Min"; $records; 0) ]
Set Variable [ $max ; Value: MBS( "FM.SQL.Max"; $records; 0) ]
Set Variable [ $avg ; Value: MBS( "FM.SQL.Avg"; $records; 0) ]
Set Variable [ $text ; Value: MBS( "FM.SQL.Text"; $records; "" /* firstRow */; "" /* lastRow */; "" /* firstCol */; "" /* lastCol */; ", " /* rowSep */) ]
Set Variable [ $r ; Value: MBS( "FM.SQL.Release"; $records ) ]
Show Custom Dialog [ "Sum: " & $sum & ¶ & "Min: " & $min & ¶ & "Max: " & $max & ¶ & "Avg: " & $avg & ¶ & "text: " & $text ]
See also
- FM.SQL.Avg
- FM.SQL.Execute
- FM.SQL.Max
- FM.SQL.Release
- FM.SQL.RowCount
- FM.SQL.Sum
- FM.SQL.Text
- SQL.Execute
Blog Entries
- Neues MBS FileMaker Plugin 9.1
- MBS FileMaker Plugin 9.1 - More than 5700 Functions In One Plugin
- MBS FileMaker Plugin, version 9.1pr1
- FileMaker SQL with Sum, Min, Max and Avg on results
Release notes
- Version 9.1
- Added FM.SQL.Max, FM.SQL.Min, FM.SQL.Avg and FM.SQL.Sum functions.
Created 30th January 2019, last changed 30th January 2019
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins