Progressdialog.SetEvaluate
--------------------------

Sets the expression to evaluate on button click.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Progressdialog](component_Progressdialog.md) | [7.1](newinversion71.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "Progressdialog.SetEvaluate"; Expression ) 

**MBS**( **"Progressdialog.SetEvaluate";** /\* Sets the expression to evaluate on button click. \*/  
**$Expression**) /\* The expression to run.  
Can be in local language of FileMaker Pro or english.   
For Server must always be in english.e.g. "$$cancel = 1" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Expression | The expression to run.   Can be in local language of FileMaker Pro or english.    For Server must always be in english. | "$$cancel = 1" |

### Result

Returns OK or error.

### Description

Sets the expression to evaluate on button click.  
You can set global variable to stop something or call MBS functions here.  
### Examples

Sets expression to hide dialog:

 MBS ("ProgressDialog.SetEvaluate"; "MBS (\\"[ProgressDialog.Hide](ProgressDialogHide.md)\\")")  
### See also

- [Progressdialog.GetEvaluate](ProgressdialogGetEvaluate.md)
- [Progressdialog.GetFileName](ProgressdialogGetFileName.md)
- [ProgressDialog.Hide](ProgressDialogHide.md)
- [Progressdialog.SetScript](ProgressdialogSetScript.md)

### Release notes

- **Version 7.1**
    - Added [Progressdialog.GetEvaluate](http://www.mbsplugins.eu/ProgressdialogGetEvaluate.shtml), [Progressdialog.GetFileName](http://www.mbsplugins.eu/ProgressdialogGetFileName.shtml), [Progressdialog.GetScriptName](http://www.mbsplugins.eu/ProgressdialogGetScriptName.shtml), [Progressdialog.SetEvaluate](http://www.mbsplugins.eu/ProgressdialogSetEvaluate.shtml), [Progressdialog.SetScript](http://www.mbsplugins.eu/ProgressdialogSetScript.shtml) to trigger script/evaluation when clicking cancel button.

### Blog Entries

- [MBS Plugin Advent calendar: 14 - Progress Dialog](https://www.mbsplugins.de/archive/2023-12-14/MBS_Plugin_Advent_calendar_14_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.1pr3](https://www.mbsplugins.de/archive/2017-02-22/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 14th February 2017 , last changed 15th October 2022

  
[Progressdialog.GetScriptName](ProgressdialogGetScriptName.md) - [Progressdialog.SetScript](ProgressdialogSetScript.md)

[HTML Version](ProgressdialogSetEvaluate.shtml)