Pre-Release Notes for Alpha Anywhere (Alpha Five Version 12)

IMPORTANT: The pre-release builds are only available to customers with a valid Alpha Anywhere subscription. If your subscription has expired you will not be able to use the pre-release build.

If your subscription is valid and you download and use the pre-release build please keep in mind that if you do not renew your subscription after it expires your eligibility to use pre-release builds will end.

 

Build 6465 5428 17 FEB-2020 - 07:15 AM

 

 

The Features and Bugs Listed Below are for the current pre-release build. These features/fixes will be included in the next official Version 12 Update. These notes are for users who are testing the pre-release update.
 

This is not an official patch, so you should not deploy this update to a production environment.

 

This pre-release build is our internal, nightly build and it is made available to you for the sole purpose of testing the new features that have been added and the bug fixes that have been made since the last official release. We are making this pre-release available to you so that you can provide us with feedback on whether the changes we are making are working correctly and have not introduced new issues.

 

If you encounter any type of bug while using this pre-release build, please send information about the bug (including full instructions on how to duplicate the issue, and a test case that we can run on our own machines) to a5v12bugs@alphasoftware.com.

 

Please do NOT post bug reports concerning the pre-release build on the message board. Alpha Software engineers do NOT routinely monitor the message board and there is a good chance that your posting will be overlooked. Also, since your posting will be referencing unreleased code, it will only serve to confuse other users.

 

This pre-release build is not intended to be used in a production environment.

 

You can download the pre-release update using these links:

https://aapatches.s3.amazonaws.com/build6465/a5v12_build6465_full_patch.exe

https://aapatches.s3.amazonaws.com/build6465/a5v12_build6465_full_DL.exe

https://aapatches.s3.amazonaws.com/build6465/a5v12_build6465_AppServer.exe

https://aapatches.s3.amazonaws.com/build6465/a5v12_build6465_AppServer_patch.exe

https://aapatches.s3.amazonaws.com/build6465/a5v12_build6465_RTPLUS_patch.exe

 

https://aapatches.s3.amazonaws.com/build6465/a5v12_build6465_ApplicationServerIIS.exe

https://aapatches.s3.amazonaws.com/build6465/a5v12_build6465_ApplicationServerIIS_Patch.exe

 

 

 

 

 

Videos

 

UX Component - List Control In-place editing - Capturing Edited Rows and Old Values (Advanced Users) When you are editing the data in a List row using in-place editing, and you have the List Detail View turned on, and the List is based on a SQL table, Alpha Anywhere generates the SQL statements to perform the CRUD operations automatically. However, there may be situations where you want to generate your own SQL CRUD. To do this, you will need to know which rows have been edited, and for each edited row you will need to know the current values in each List row as well as the original values.

In this video we show how this can be done.
Watch Video

Date added: 2020-02-03
UX Component - Multi-select Tokens Control Adding Tokens to a SQL Database The Multi-select Tokens control allows you to select tokens from a pick-list and (optionally) type tokens into the control. You can configure the control to only allow tokens that are in the pick list or to allow the user to type in any token value. If the user types in a token value that is not in the pick list you can fire a notInList event and add the token to the pick list (and to the database table that backs the pick list).

In this video we show how a token value that a user enters is added to a SQL table.

Watch Video
Download Component
Date added: 2020-02-11
     

 

Features

Build 6465

UX Component - Action Javascript - Open a UX Component Action - When you define an action to open a UX in a Window, you can specify that the a cached version of the component should be used the second and subsequent time it is opened. You can also specify that the data bound controls can be populated with the child UX is both opened the first time and also opened subsequently. Now in addition to repopulating the data bound control when the child UX is both opened and re-opened, you can also specify the certain controls (such as Lists and Viewboxes) should also be refreshed when the child UX is re-opened.

 

 

Build 6461

UX Component - Find Dialog - Previously you could only find certain control types (such as Buttons, Static Text) by the text that display in the UX builder control tree. Now you can also search by ID

 

Build 6459

UX Component - MultiSelectTokens Control - inputFocus() Method - The MultiSelectTokens control now has a new method that allows you to set focus to the control.

 

Watch Video
Download Component

 

For example:

 

var vobj = {dialog.object}.getControl("MULTISELECTTOKENS");

vobj.inputFocus();
 

Build 6457

UX Component - Map Control - ViewBox - Adding Markers to Map - Action Javascript has previously allowed you to add multiple markers to a Map control using data that is stored in a List Control. Now you can also add multiple markers to a Map control using data that is in ViewBox control.

 

UX Component - ViewBox Control - Action Javascript - Two new action are available for the Action Javascript action for ViewBox controls. These are:

 

Build 6455

 

UX Component - List Control - Checkbox Column - onRowCheck Event - A new event has been added to the List. The onRowCheck event will fire if the List has the Checkbox column turned on and the user toggles the checkmark in a row in the List.

 

New Version Notice - Suppress in Runtime - You can now suppress the New Version warning for Runtime applications.

 

Build 6453

UX Component - Find Dialog - Collapsed Containers - Previously the Find Dialog did not search inside containers that had been collapsed. Now the search is performed in all containers, but if a match if found in a collapsed container, the dialog will warn you that you can't set focus to the control because it is inside a collapsed container.

Build 6444

 

Publishing Files - Saving a File List - When you publish your Application, the Publish dialog gives you the option of publishing all files, selected files, or the currently selected file in the Web Control Panel. If you select the Selected Files option you get a dialog where you can select the files you want to publish. The list of files you select can now be saved with a name so that you can quickly retrieve a previously saved list of files.

 

 

Build 6441

Editors -Search - When you open the Search or Search and Replace dialog, the currently selected text (if any) will be shown as the default in the Find What? text box.

UX Component - List Control - In-place Edit - SVG Icons - Sizeable - The default class name for the SVG icons used in in-place edit has been changed from icon to iconSizeable. As a result of this change you can now more easily adjust the size of the SVG icons used for in-place edited (previously you had to change the icon class name from icon to some other class that did not specify the icon size before you could adjust the icon size).

Build 6435

UX Component - Width Property - Custom Class - <none> - If you have a control in your UX and you specify a custom class for this control and the custom class specifies a width property, the width set in the class will not be used unless you also use the !important CSS flag in the custom class definition. Now, you can set the control's width property to <none> and the width specified in the custom class will be honored (without requiring the !important flag).

 

UX Component - Ajax Callbacks - Submit List Data - When you make an Ajax callback from a UX you can now automatically submit the data from all of the Lists on the UX. This could potentially submit a large amount of data when the callback occurs (as the List may have a large number of rows of data in it) and you should only turn this property on if you really need access to the List data in your server side event handler.

The List data will be available in the e.__listData property in the e object passed to your Xbasic function that handles the callback. e.__listData will be a JSON array with a listId and data property in each array item.

 

 

 

Xbasic -  word_merge_python() Function - Performs a Word Mail Merge Operation - A common requirement is to create a Microsoft Word document from a Word template by merging data into placeholders in the Word template documents. There is an existing Xbasic function to do this (the a5_word_merge_dotNet() function), but this function requires that Microsoft Word is installed on the machine where the Alpha Server is running. This precludes the a5_word_merge_dotNet() function from being used in applications that are hosted on Alpha Cloud). The word_merge_python() function does not require that Word be installed and also, this function is significantly faster than the the a5_word_merge_dotNet() function.

 

Syntax

p Result = word_merge_python(C fn_template,C fn_out,C json)

Where:

 

Another significant benefit of the word_merge_python() function is the ability to merge data from nested Arrays in the input JSON data into tables in the Word template. Additional rows are automatically added to the table in the template document to accommodate all of the rows in the nested array in the input JSON.

IMPORTANT: In order to use the word_merge_python() function you must install Python, which (as of the time of this writing) is not installed by default when you install Alpha Anywhere. Installing the Python dependency in the Alpha Anywhere IDE is done by selecting the Tools, Packages menu command when the Web Control Panel has focus



Installing the Python dependency in your Web Project is done by clicking the Project Properties button on the Web Control Panel and then clicking the smart field for the Referenced Packages property.

 

How to Create the Word Template

To create the Word template, create a new Word document and then insert placeholders in the Word document for the fields in your JSON data.

To insert a field placeholder, put your insertion point at the place where you want to insert the placeholder and then press Ctrl-F9.

This will insert a pair of braces as shown in the above image (DO NOT type the braces yourself).

Type (case insensitive) the following between the braces:

Mergefield name_of_field_in_json_data

For example, say you have a field in your JSON data called Firstname, you would type:

When you are done, press the F9 key (with the insertion point inside the braces). The document will then show the placeholder as follows:

To edit the placeholder, right click on it and select Edit Field...

 

How to Define Tables in the Word Template for Array Data in the JSON

To insert data from a nested array into a table in the Word Template, insert a Table into the Word document, The table should have two rows - one for column headings and one for placeholders, and as many columns as you need (plus one additional column - which can be hidden, as explained later- where the Linking field must be specified).

For example, consider the following JSON data. This data has a nested array called Children.

{
    "Firstname": "John",
    "Lastname": "Smith",
    "City": "Boston",
    "State": "MA",
    "Children": [
        {
        	
            "Name": "Callie",
            "Age": 5
        },
        {
            "Name": "Griffin",
            "Age": 3
        },
        {
            "Name": "Luke",
            "Age": 1
        }
    ]
 }		
		

The Word template should have a table that looks like this (Note, the << >> characters are not typed in yourself - they are inserted by Word automatically when you insert placeholders as explained above - i.e. by pressing Ctrl - F9):

 

  Name Age
<<Children>> <<Name>> <<Age>>

 

Notice that the first column (i.e. the linking column) has a placeholder with the name of the nested array (Children). The column heading for this this column is irrelevant (and is blank in this example). The data in the array is shown using placeholders in the second row (columns 2 and 3). The column heading for the data columns can be anything you want (i.e. they do not have to match the names of the data properties).

 

How to Hide the Linking Column

To hide the linking column (i.e. the first column), select the first column and set the font color to white on white. Then set the font size for the column to 1 pixel (the smallest value Word allows), then set the cell border to none, then drag the column divider to the left to make the column as narrow as possible.

After you do this, the first visible column (the Name column in this example) will not have a left border, so select the column and turn on the border for all edges.

Watch Video

 

 

Example

 

Assume the following JSON data:

{
    "CUSTOMERID": "123",
    "FIRSTNAME": "Fred",
    "LASTNAME": "Thomas",
    "COMPANY": "Alpha Anywhere Development",
    "ADDRESSES": [
        {
            "ADDRESSTYPE": "Billing",
            "ADDRESS": "123 Billing Street",
            "CITY": "Boston",
            "STATE": "MA",
            "POSTALCODE": "02134"
        },
        {
            "ADDRESSTYPE": "Headquarters",
            "ADDRESS": "987 Headquarters Lanest",
            "CITY": "Burlington",
            "STATE": "MA",
            "POSTALCODE": "01803"
        },
        {
            "ADDRESSTYPE": "Shipping",
            "ADDRESS": "33 Shipping Ave.",
            "CITY": "Lexington",
            "STATE": "MA",
            "POSTALCODE": "02142"
        }
    ]
}		
		
 

Assume a Word template document that looks like this (You can download this template by clicking here):

NOTE: The linking column in the table is now shown, as it has been hidden. The first column in the table actually has a placeholder in the second row called Addresses to indicate that the table will display data from the nested ADDRESSES array.

Xbasic to merge data into template:

dim json as c

json = <<%txt%

    JSON data shown above goes here......

%txt%

dim fn_template as c = "c:\word\template.docx"
dim fn_out as c = "c:\word\template_out.docx"
dim p as p
p = word_merge_python(fn_template,fn_out,json)

 

 

The resulting Word document showing the placeholders replaced with data and showing the Table expanded to show all of the data in the nested array will look like this.

 

 

Advanced Actions

Here is a sample JSON definition for the fn_out parameter to specify that the resulting Word document should be uploaded to an Amazon S3 bucket. (Important: Your Alpha Anywhere connection string must not be encrypted). The objectName can specify a folder in your S3 bucket.

{
    "type": "Store",
    "storageConnectionString": "your_AA_storage_connection_string",
    "objectName": "word_merge/document1.docx"
}

 

Here is a sample JSON definition for the fn_out parameter to specify that the resulting Word document should be emailed:

 

{
    "type": "email",
    "apikey": "your SparkPost or SendGrid API key",
    "send_to": "comma delimited list of email addresses",
    "send_from": "email address of sender",
    "send_from_friendly_name": "name of sender",
    "subject": "subject",
    "message": "message body",
    "attachment_filename": "name of attachment file e.g. invoice.docx"
}

 

NOTE: If you are using SendGrid, prefix the API key with sendgrid: .

 
Build 6429

 

Documentation - Xbasic - A new Xbasic Guide is available. Click here.

 

Application Server - Logs - Fewer Warning Messages -  Previously the logs for both the Classic Server and IIS Server would report warnings in the Xbasic error log if you set a session variable to a non-character value. These warnings are no longer reported. Also, if your component submitted data that would result in an invalid variable name (for example, you submitted a form with an input control that had a name of first-name, the logs would contain a warning that the variable had been renamed to first_name. In the case of the Grid component, which uses a naming convention of V.R[rownumber].NAME for variables (where [rownumber] is a negative number for new record rows), the Xbasic error log could contain a large number of warnings (that a variable of the form V.R-1.NAME had been renamed to V.R_1.NAME). These warnings are now suppressed in the Xbasic Error logs.

As a result of these changes, the Xbasic Error log will be smaller, and will be easier to read, as it will no longer have so many warnings.

UX Component - Manifest - PhoneGap - A Manifest allow you to specify a list of files that can be downloaded and installed on a device so that the files are available even if the device no longer has an internet connection. Previously, only one manifest could be specified. Now, you can define named manifests and you can download and install multiple manifests on a device.

The default manifest is automatically given a name of Default Manifest.

The Action Javascript Manifest actions allow you to specify the name of the Manifest that the action applies to.

Two new action have been added to Action Javascript - Manifest Action. These are:

 

 

Bugs

Build 6459

UX Component - MultiSelectTokens Control - inputFocus() Method - NotInList Event - Fixed a regression resulting in the NotInListEvent not firing when the user typed a value into the multi-select-tokens control.

Build 6446

UX Component - List and ViewBox - DelayRenderTillVisible - Both the List and ViewBox controls have a property that delays the rendering of the data in the control (property is only available for certain data source types, such as SQL) until the control is actually visible. Determining if the List or VieBox is visible is now more robust and this property should now behave more predictably.

 

Build 6444

UX Component - Ajax Callbacks - Radio Buttons - As a result of a recent regression, if the UX was "clean" the value of Radio Button controls in the e.dataSubmitted object passed to the Xbasic function handler was not set.

Build 6437

SQL Builder - Focus - Fixed a focus issue when the Filter tab had focus and the user tried to edit the SQL text.

UX Builder - HTML Controls - Class Name - The way in which the user specified class name for certain controls (i.e. textbox, textarea, etc.) is applied has been fixed. Now, when you specify a class name you can specify if the class name is in addition to, or replaces the default class name for the control. Prefix the class name with a + character to indicate it is in addition to the default class name for the control type. If you do not use the + prefix, the class name you specify is used in place of the default class name for the control type.

 

Build 6429

AlphaDAO - Oracle - PortableSQL - AddMonthsToDate() Function - Changed the way native SQL is generated for Oracle for the AddMonthsToDate() portable function.

Application Server - Memory Leak - Fixed a memory leak when running old UX components that had not been edited and resaved for a long (unclear how far back) time.

UX Component - Repeating Sections - Image and File Upload - Data Binding - Fixed an issue when uploading images or files in a Repeating Section. The uploaded file information was not persisted to the corresponding data bound field in the target table.

AlphaDAO - Native SQL - Trailing Spaces - If the SQL statement you executed using Native SQL contained a trailing CRLF and did an insert, the last inserted identity was not correct.

 

UX and TabbedUI Component - In certain cases the server would return a 500 error reporting an issue in the a5wcb_createBackupForImportedComponent() (the reported error was: Error calling 'XDialogBox' .a5wui method')

 

Application Server - Gzip Caching - The Application Server was not correctly recognizing that a static asset had changed after it was initially requested.

For example, say you requested:

http://www.myapp.com/image1.jpg

 

Then changed image1.jpg on the server and then requested:

http://www.myapp.com/image1.jpg?1234

The new image was not rendered.

 

UX - List Control - Action Javacript - Filter Records in a List - Date Fields - Range Search - Fixed an issue when executing a range search on a Date type fields (Datetime fields worked OK).