Closes an open data file.
•File ID is a numeric expression that specifies the file ID of an open data file.
Product | Supported |
FileMaker Pro Advanced | Yes |
FileMaker Go | Yes |
FileMaker WebDirect | No |
FileMaker Server | Yes |
FileMaker Cloud products | Yes |
FileMaker Data API | No |
Custom Web Publishing | Yes |
Runtime solution | No |
FileMaker Pro 18.0 Advanced
Use this script step to close an open data file. For a list of the file IDs of all currently open data files, use the Get(OpenDataFileInfo) function. To close all open data files, set the File ID parameter to "*" (an asterisk surrounded by double quotation marks). All data files are closed when FileMaker Pro Advanced quits.
Closes the open data file with a file ID of 2.
Close Data File [ File ID: 2 ]
Closes all open data files.
Close Data File [ File ID: "*" ]
Opens a file, sets the file ID to a variable, reads the entire file, then closes the file using the same file ID.
Set Variable [ $file ; Value: "data.txt" ]
Open Data File [ "$file" ; Target: $fileID ]
Read from Data File [ File ID: $fileID ; Amount (bytes): ; Target: Table::Data ; Read as: UTF-8 ]
Close Data File [ File ID: $fileID ]