FM.InsertSetUpdateProgressDialog
--------------------------------

Enable updating progress bar.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FM](component_FM.md) [FMSQL](component_FMSQL.md) | [6.2](newinversion62.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

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

**MBS**( **"FM.InsertSetUpdateProgressDialog";** /\* Enable updating progress bar. \*/  
**$Update**; /\* Pass 1 to update Progress Dialog.  
Pass 0 to disable feature.e.g. 1 \*/   
**$Base**; /\* Optional; The progress base in percent.  
Default is 0.e.g. 25 \*/   
**$Factor**) /\* Optional; The factor to apply for progress update.  
Default is 1.e.g. 0.5 \*/ 

### Parameters

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

### Result

Returns OK or error.

### Description

Enable updating progress bar.  
If you enable progress dialog updates, the functions [FM.InsertRecordQuery](FMInsertRecordQuery.md), [FM.InsertRecordQueryIgnoreDuplicates](FMInsertRecordQueryIgnoreDuplicates.md) and [FM.InsertRecordTSV](FMInsertRecordTSV.md) 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](FMInsertRecordTSV.md) 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](ProgressDialogSetTitle.md)"; "Please wait." )\]  
Set Variable \[$r ; Value:MBS ( "[ProgressDialog.SetShowButton](ProgressDialogSetShowButton.md)"; 0 )\]  
Set Variable \[$r ; Value:MBS ( "[ProgressDialog.SetTopText](ProgressDialogSetTopText.md)"; "Importing text file..." )\]  
Set Variable \[$r ; Value:MBS ( "[ProgressDialog.Show](ProgressDialogShow.md)" )\]  
Set Variable \[$r ; Value:MBS ( "FM.InsertSetUpdateProgressDialog"; 1)\]  
Set Variable \[$r ; Value:MBS ( "[FM.InsertRecordTSV](FMInsertRecordTSV.md)"; ""; "TSV Import"; "First¶Last¶Street¶City¶State¶Zip¶Country"; TSV Import::Text to Import )\]  
Set Variable \[$r ; Value:MBS ( "[ProgressDialog.Hide](ProgressDialogHide.md)" )\]  
### See also

- [Dialog.SetTop](DialogSetTop.md)
- [FM.InsertRecord](FMInsertRecord.md)
- [FM.InsertRecordQuery](FMInsertRecordQuery.md)
- [FM.InsertRecordTSV](FMInsertRecordTSV.md)
- [FM.SetSQLBatchMode](FMSetSQLBatchMode.md)
- [ProgressDialog.Hide](ProgressDialogHide.md)
- [ProgressDialog.SetShowButton](ProgressDialogSetShowButton.md)
- [ProgressDialog.SetTitle](ProgressDialogSetTitle.md)
- [ProgressDialog.SetTopText](ProgressDialogSetTopText.md)
- [ProgressDialog.Show](ProgressDialogShow.md)

### Blog Entries

- [MBS FileMaker Plugin, version 6.2pr3](https://www.mbsplugins.de/archive/2016-04-05/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 3th April 2016 , last changed 18th September 2016

  
[FM.InsertRecordTSV](FMInsertRecordTSV.md) - [FM.IsMainThread](FMIsMainThread.md)

[HTML Version](FMInsertSetUpdateProgressDialog.shtml)