Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

FM.InsertSetUpdateProgressDialog

Enable updating progress bar.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
FM FMSQL 6.2 Yes Yes No No No

MBS( "FM.InsertSetUpdateProgressDialog"; Update { ; Base; Factor } )

Parameters

Parameter Description Example value
Update Pass 1 to update Progress Dialog.
Pass 0 to disable feature.
1
Base Optional
The progress base in percent.
Default is 0.
25
Factor Optional
The factor to apply for progress update.
Default is 1.
0.5

Result

Returns OK or error.

Description

Enable updating progress bar.
If you enable progress dialog updates, the functions FM.InsertRecordQuery, FM.InsertRecordQueryIgnoreDuplicates and FM.InsertRecordTSV will update progress dialog.
If cancel button is clicked, the functions may cancel and return an error. Depending on event handling a cancel button may not work while a plugin function runs!

You can use Base/Factor to adjust updates in progress dialog. e.g. if you have 4 things to do and FM.InsertRecordTSV is 2nd one, you can use a base of 25 (so 25% is for first thing to do) and factor of 0.25. Our progress will go from 25 to 50% than.

Examples

Import tab return text data as records with progress dialog:

Set Variable [$r; Value:MBS( "ProgressDialog.SetTitle"; "Please wait." )]
Set Variable [$r; Value:MBS( "ProgressDialog.SetShowButton"; 0 )]
Set Variable [$r; Value:MBS( "ProgressDialog.SetTopText"; "Importing text file..." )]
Set Variable [$r; Value:MBS( "ProgressDialog.Show" )]
Set Variable [$r; Value:MBS( "FM.InsertSetUpdateProgressDialog"; 1)]
Set Variable [$r; Value:MBS( "FM.InsertRecordTSV"; ""; "TSV Import"; "First¶Last¶Street¶City¶State¶Zip¶Country"; TSV Import::Text to Import )]
Set Variable [$r; Value:MBS( "ProgressDialog.Hide" )]

See also


FM.InsertRecordTSV   -   FM.IsMainThread

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins