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
ProgressDialog.SetProgress
Sets the current progress value.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| ProgressDialog | 2.4 | Yes | Yes | No | No | No |
Parameters
| Parameter | Description | Example |
|---|---|---|
| value | New value. Range from 0 to 100 for a normal progress bar or negative value for indeterminated progress bar. | 50 |
Result
Returns "OK" on success.
Description
Sets the current progress value.Depending on your range, you need to multiply/divide to get into range from 0 to 100. Typically you can simply do math like this: $index * 100 / $total. That calculates the percentage of files processed if you have $total files and current file index is $index.
If you process more than 100 items, please consider only updating progress if you actually moved forward 1%. You can do this by keeping variable with last progress you set and update only if new progress value is bigger.
Please do not call this function more than one time per second to avoid the progress window redraw to slow down your process.
Examples
Set progress bar to indeterminate while preparing operations:
MBS( "ProgressDialog.SetProgress"; -1 )
Set later progress bar to current value:
MBS( "ProgressDialog.SetProgress"; $index * 100 / $total )
Update only when changed by one percent:
Set Variable [$percent; Value:Round(100 * $current / $total; 0)]
If [$percent ≠ $lastpercent]
Set Variable [$lastpercent; Value:$percent]
Set Variable [$r; Value:MBS( "ProgressDialog.SetProgress"; $percent )]
End If
See also
- FM.SetSQLBatchMode
- ImageCapture.RequestScan
- ImageCapture.SetParameter
- JSON.Import
- ProgressDialog.GetTopMost
- ProgressDialog.GetTopText
- ProgressDialog.SetCancel
- ProgressDialog.SetPosition
- ProgressDialog.SetTopMost
- ProgressDialog.SetTopText
Example Databases
- CURL/Amazon S3 Upload File
- CURL/CURL Download with Progress
- CURL/Email/Batch Emailer
- CURL/FTP/CURL FTP Upload from file with Progress
- DynaPDF/Scan with WIA to PDF
- Mac and iOS/Addressbook/Addressbook
- Mac only/MetaDataQuery/Search Applications
- WebViewer/WebKit 1.x macOS only/WebViewer Download Delegate for Mac with Custom Webviewer
- WebViewer/WebKit 1.x macOS only/WebViewer Download Delegate for Mac
- XML/XML Import
Blog Entries
FileMaker Magazin
Created 18th August 2014, last changed 17th January 2016
ProgressDialog.SetPositionCentered - ProgressDialog.SetShowButton
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins