Mashup Builder > Functions > Confirmation
Confirmation
* 
In previous releases of ThingWorx, the Confirmation dialog was part of the Button and Logout widgets. This function merges the functionality into a set of properties that you can bind to any widget. To create the same functionality, bind the Clicked event of a Button or a Logout widget to the function.
The confirmation function enables you to display confirmation dialogs within your mashups. You can use the confirmation dialog to add the following functionality:
Highlight important information as a message.
Verify that the user wants to perform an action.
Offer the user multiple choices when performing a task.
To open the confirmation dialog during run time, bind events, such as the Clicked event property of a Button widget, to the OpenConfirmation service. When the button is clicked, the Clicked event triggers the OpenConfirmation service and the confirmation dialog opens.
Confirmation Dialog
Function Options
You can configure the confirmation function by setting the following options:
Option
Description
Description
A description for the function
Title Text
The title of the confirmation dialog
Message Text
The message to display in the confirmation dialog
Dialog Width
Specifies a fixed width for the dialog. Set to 600 by default
Dialog Height
Specifies a fixed height for the dialog. Set to 260 by default
Cancel Button Label
The label for the Cancel button.
Action Button Position
The position of the action button in the dialog. You can set it to Left or Right
Action Button Label
The text label for the action button.
Action Button Type
The action button type. You can set it to Primary or Danger.
Add a Second Action Button
Displays a second action button
Second Button Label
The text label for the second action button
Close Button
Displays a close button in the confirmation dialog
Creating a Confirmation Function
1. On the Functions panel, click . The New Function dialog opens.
2. Select the Confirmation function from the drop down list.
3. Enter a name for the function, and then click Next.
4. Modify the function options as required.
5. Click Done.
The confirmation function is added to the Functions panel.
Function Properties
The Confirmation function contains the following properties.
Property
Description
Base Type
Default Value
Bindable? (Y/N)
Localizable? (Y/N)
TitleText
Sets the title of the dialog.
STRING
n/a
Y
Y
MessageText
Sets the text message for the dialog.
STRING
n/a
Y
Y
DialogWidth
Sets a fixed width for the dialog.
NUMBER
600
Y
N
DialogHeight
Sets a fixed height for the dialog.
NUMBER
260
Y
N
OpenConfirmation
A service that opens the confirmation dialog.
n/a
n/a
Y
N
ActionClick
An event that triggers when the primary action button is clicked.
n/a
n/a
Y
N
SecondActionClick
An event that triggers when the second action button is clicked.
n/a
n/a
Y
N
CancelClick
An event that triggers when the cancel button is clicked.
n/a
n/a
Y
N
Was this helpful?