Mashup Builder > Migrating Legacy Mashups > Replacing Non-Secure Expressions in a Mashup > Finding Non-Secure Expressions in your Mashups
Finding Non-Secure Expressions in your Mashups
You can review expressions when replacing non-secure functions in Mashup Builder using the Replace option on the Functions panel. Replacing a function opens the code editor and displays the current expressions that are used within the function. Unsupported objects and functions are highlighted as errors. In addition, reminders are displayed in the Reminders panel when a function or widget contains references to unsupported functions or objects. You can click Done to apply the changes and replace the function, or Cancel to replace the function later.
The following sections describe how to quickly check references to unsupported functions or objects that may be used within mashup expressions. For more information, see Supported Runtime Functions and Objects.
Finding Non-Secure Functions and Grid Expressions in Mashup Builder
To locate expressions used in the Expression and Validator functions:
1. In Composer, open a mashup entity that you want to check, and then click Edit > Design. The Mashup Builder user interface opens.
2. On the Functions panel, expand Expressions (Not Secure) and Validators (Not Secure) function groups. All non-secure functions in the mashup are listed.
Alternatively, review the Reminders panel for any warnings about non-secure functions.
3. To view current expressions for the widget, click Edit Function.
4. Review the JavaScript expression that is defined for the function, and then click Done.
5. Repeat these steps for additional non-secure functions that you want to inspect.
To locate expressions used in existing Grid widgets:
1. In Composer, open a mashup entity that you want to check, and then click Edit > Design. The Mashup Builder user interface opens.
2. Select an existing grid widget on the canvas or using the Explorer panel.
3. On the Properties panel, click the widget configuration button. The columns configuration dialog box opens.
4. In the left pane, select a data column, then in the right pane, inspect the Expression field for any validation expressions.
5. Repeat these steps for any mashups that contain grid widgets.
Alternatively, you can quickly find non-secure expressions that are used in your mashups by exporting all your mashups as an XML file, and then checking the file content. To create an XML Export of all the Mashups on your ThingWorx Platform server:
1. In Composer, click Import/Export, then choose Export. The Exportdialog box opens.
2. Under Export Option, select To File.
3. Under Export Type, select Collection of Entities.
4. Under Collection, select Mashups.
5. Under Export Format, select XML.
6. Click Export, and then save the XML file on your system.
To search for expressions in the XML export of your mashups, perform the following steps:
1. Right-click the XML file you downloaded and open it in a text editor of your choice.
2. Inspect any expressions that you are currently using by searching for the properties that are defined in the following sections.
Finding Non-Secure Expression Functions
To locate Expression functions in the XML file export, search for Type properties that are set to expression:
"Type" : "expression"
The JavaScript expression is stored as a value for the Expression property.
Finding Non-Secure Validator Functions
To find non-secure Validator functions in the XML file export, search for Type properties that are set to validator:
"Type" : "validator"
The JavaScript expression is stored as a value for the Expression property.
Finding Non-Secure Grid (Themable) and Grid (Advanced) Widgets
To find non-secure expressions within web component Grid widgets, search for Type properties that are set to ptcsgrid:
"Type" : "ptcsgrid"
To find non-secure expressions within Grid (Advanced) widgets, search for Type properties that are set to gridadvanced:
"Type" : "gridadvanced"
When the grid widgets are configured using properties, expressions are stored in the ValidationExpression property under Widgets.Properties.ColumnFormat.
When a grid widget is configured using JSON configuration data, expressions are stored in the expression property under validator". Typically, JSON configuration data is stored in a data service of a Thing.
Finding Legacy Validators within Grid (Legacy) Widgets
To find non-secure expressions within Gird (Legacy) widgets, search for Type properties that are set to dhxgrid:
"Type" : "dhxgrid"
The expressions are stored in the ValidationExpression property under Widgets.Properties.ColumnFormat.
Was this helpful?