InVision 2.6.1 introduces 23 new features and enhancements. The most interesting new feature in this release is probably the support for macros in SQL Reports and SQL Scripts. Macros enables you to use C# to dynamically generate SQL queries at runtime, before they are executed. You no longer need to concat a string using SQL and then execute it using sp_executesql. For details about how to use macros, you should read this blog post, which goes into details on the subject.
NEW Features
We have added 11 distinct new features across 8 different component types (some of the features applies to multiple components).
Form Schemas
Name as HTML Element ID
Each HTML (form) element gets their ID from the Name property of the UI element configuration. This behavior can be changed for all elements by setting the ApplyNameAsHtmlElementId
property of the root UI element, or individually for each element.
This feature makes it easier to target specific HTML element from custom JavaScript code or css rules.
Support for Image
You can either hard code the image url into the Source property, or data bind to a property in a model.
Example
<Image Row="2" Column="1" Source="{Binding Path:Person.Photo}" />
Access native HTML element
The native DOM element can now be accessed through the NativeElement()
function on the control proxy element.
For example, if you have declared an input control and named it “myControl”, you can access the native DOM element by calling it from a Function or Event Handler like this:
var input = myControl.NativeElement(); // do something with the input control input.style.color = 'red';
Form Element
Toggle read only state
You can now toggle the read only state of a Form Element by calling SetReadOnly(true|false)
from its ExecuteExpression action.
Example
In the ExecuteExpression acton of a Form Element, call the SetReadOnly(…) function.
SetReadOnly(_someCount == 1);
Input Element
Toggle read only state
You can now toggle the read only state of a Input Element by calling SetReadOnly(true|false)
from its ExecuteExpression action.
SQL Report
Support for macros
Macros enables you to define and execute dynamically built SQL queries without constructing them using SQL and executing via sp_executesql. The macros are written in C#, which offers great flexibility for constructing dynamic queries. You need to use the Desktop Designer to create macros.
Caption can be changed dynamically
This feature makes it easier to provide contextual captions for reports than previously, when you had to add custom labels for this purpose. To dynamically change the caption of a SQL Report after it has been loaded, call the SetCaption(...)
, SetCaptionSuffix(...)
or ResetCaption()
functions in the ExecuteExpression action of the component.
The example below shows how to append a suffix to the standard caption of a report. If the standard caption was “Products”, then the new caption would be “Products – Football” (if the product name is Football).
SetCaptionSuffix("- " + _selectedProduct.ProductName);
Support for unloading data
This feature is useful when you need to clear the contents of a report. Previously, you had to load data by providing dummy values as arguments.
To clear the contents of a SQL Table Report, execute the UnloadData action.
SQL Script
Support for macros
Macros enables you to define and execute dynamically build SQL scripts without constructing them using SQL and executing via sp_executesql. The macros are are written in C#, which offers great flexibility for constructing dynamic SQL scripts. You need to use the Desktop Designer to create macros.
Worksheet
Caption can be changed dynamically
This feature makes it easier to provide contextual captions for Worksheets than previously, when you had to add custom labels for this purpose.
Unique key constraint
You can now easily set up unique key constraints on Worksheet columns which will give the user feedback directly in the UI when the constraints are violated. If such violations exists, the system will prevent the user from performing save operations, which would otherwise result in the terrifying experience of being presented the PK violation error message from the database.
The Unique Key Constraint configuration is specified in the Rules screen of the Worksheet configuration editor.
Support for unloading data
This feature is useful when you need to clear the contents of a Worksheet. Previously, you had to load data by providing dummy values as arguments.
To clear the contents of a Worksheet, execute the UnloadData action.
Setting tables
Caption can be changed dynamically
This feature makes it easier to provide contextual captions for Setting tables than previously, when you had to add custom labels for this purpose.
Unique key constraint
You can now easily set up unique key constraints on Setting table columns which will give the user feedback directly in the UI when the constraints are violated. If such violations exists, the system will prevent the user from performing save operations.
The Unique Key Constraint configuration is specified in the Rules screen of the Setting table configuration editor.
Support for unloading data
This feature is useful when you need to clear the contents of a Setting table. Previously, you had to load data by providing dummy values as arguments.
To clear the contents of a Setting table, execute the UnloadData action.
Filter
New filter type List
Identical to the Checkbox List Filter, but without the check boxes 🙂
Spreadsheet general
Cells selection info
We added a new property – Selection – to the @Event object when a Custom Context Menu Action clicked event is raised. The selection object contains information about which cells are currently selected. This feature enables you to perform operations on a slice of the data in the spreadsheet.
IsRowLocked(...)
Eaze function lets you check whether a row is locked or not. This enables you to more easily apply custom styling to rows based on their locked state.
Example
isRowLocked = IsRowLocked(GetCallContextRow())
FIXES and ENHANCEMENTS
We have made 12 fixes and enhancements across 7 different component types.
Spreadsheet (Worksheet, Setting, SQL Table Report)
Fixed
– Entering non-numeric values into numeric columns freezes spreadsheets and calculations.
– Column sorting for Date columns used US locale, which caused incorrect sort order.
Enhancements
– Improved scrolling performance in spreadsheets.
– Spreadsheet scroll position is reset after filtering operation.
– Source Column Predicate and Caption Formatter properties of Template Columns now accepts JavaScript function expressions in addition to regex and function references.
Filter
Fixed
– Pressing ‘Select All’ in a Checkbox Filter did not apply the filter selection properly.
– Arguments set for text search filters in the LoadData action was not included with the search term.
Enhancements
– UI control sizes (drop down, launchers, etc) changed to match default sizes of other Workbook componentsForm ElementEnhancements
– UI control sizes (drop down, launchers, etc) changed to match default sizes of other Workbook components.
Transaction Pipeline
Fixed
Fixed an issue for configurations where (one or more) Key Relation columns were non-character based.
Enhancements
Performance improvements
Authentication
Enhancements
Improved session lifetime support for Azure AD authentication (the user have to re-authenticate less frequently)
INSTALLING or UPGRADING
As always, use the Installation Manager to install or upgrade to 2.6.1
Note! You will probably need to clear the IE browser cache before attempting to start the SL Designer.
Enjoy!
– The Cloud and Applications Team