Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
FileDialog.SetFilter
Queries whether other file types are allowed.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
FileDialog | 4.3 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameters
Parameter | Description | Example |
---|---|---|
MacFilter | The filter specification for Mac. Can be file extension (Without dot) or UTI (Uniform Type Identifier). Can be a list. | "jpg" |
WinFilter | The filter specification for Windows. This is normally star dot file extension and can be a list. | "*.JPG" |
WinLabels | The list of labels for the file types. | "JPEG files" |
Result
Returns OK or error.
Description
Queries whether other file types are allowed.Mac filter works in FileMaker 12 or newer, but seems not to work in FileMaker 11.
If you like to select any file, please don't define a filter at all.
Examples
Set Mac filter with file extension as filter
MBS("FileDialog.SetFilter"; "jpg"; "*.JPG"; "JPEG files")
Set Mac filter with UTI as filter:
MBS("FileDialog.SetFilter"; "public.jpeg"; "*.JPG"; "JPEG files")
Select only FileMaker files:
MBS("FileDialog.SetFilter"; "fmp12"; "*.FMP12"; "FileMaker files")
Select tiff or jpeg files with various extensions:
MBS("FileDialog.SetFilter"; "tif¶jpg¶jpeg¶tiff"; "*.TIF;*.TIFF¶*.JPG;*.JPEG"; "Tiff files¶JPEG files")
Allow PNG and JPEG:
MBS("FileDialog.SetFilter";
"jpg¶png¶";
"*.JPG¶*.PNG¶*.*";
"JPEG files¶PNG Files¶All files")
Allow text files:
MBS("FileDialog.SetFilter"; "public.text"; "*.TXT"; "TXT files")
See also
- FileDialog.GetFilter
- FileDialog.OpenFileDialog
- ListDialog.GetFilter
- ListDialog.SetFilter
- XL.Book.SaveToFile
Release notes
- Version 8.4
- Changed FileDialog.SetFilter to pick first file extension listed as default one for saving.
Example Databases
- CURL/Email/IMAP Email
- DynaPDF/Extract and analyze images
- Mac only/Movies/AVAsset Export Session
- PDF Viewer
- Win Only/WindowsML
- XL/Writing data
Blog Entries
This function is free to use.
Created 18th August 2014, last changed 15th May 2023
FileDialog.SetCanSelectHiddenExtension - FileDialog.SetInitialDirectory