Nightly Build Notes for Alpha Anywhere

IMPORTANT: The nightly builds (previously called 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 nightly build.

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

 

Build 7618- 5572 16 APR 2021 - 10:15 AM

 

The Features and Bugs Listed Below are for the current nightly build. These features/fixes will be included in the next official Update. These notes are for users who are testing the nightly build.
 

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

 

This nightly build is our internal, development 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 nightly build 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 nightly 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 nightly 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 nightly build is not intended to be used in a production environment.

 


 

Downloading the Universal Installer

IMPORTANT: A new installer (called the Universal Installer)  is used to install the nightly builds. To learn more about the Universal Installer, click here.

Videos

 

UX Component - Ajax Callbacks Checking connectivity before making an Ajax callback If the user makes an Ajax callback and there is no internet connection, the Ajax failed event will fire after the Ajax callback times out. It can take quite a few seconds before the Ajax callback times out. It would be preferable to let the user know that Ajax callbacks are not possible before they try to make a callback. Also, in disconnected mobile applications, you might want to prevent the user from tying to synchronize data if the connection is poor.

In this video we show how this can be done.

Watch video
Download component

Date added: 2021-03-28
UX Component - DropdownBox Controls Populating the choices in a DropdownBox Control Using Javascript Typically, the choices in a Dropdown box control are either static or the result of a database query. However, you might want to dynamically populate the choices in a Dropdown box control using JavaScript.

In this video we show how this can be done. We also show how you can implement cascading choices in a dropdown that is populated using JavaScript. The advantage of implementing cascading dropdownboxes using JavaScript is that the child dropdown boxes are populated without having to make an Ajax callback. So this technique will work in disconnected applications.

Watch video
Download component

Data added: 2020-03-29
UX Component - List Control Synchronizing Data in a List with Detail View - Advanced Synchronization Options When you synchronize data in an offline application, you might want to let the user know immediately if synchronization is currently not possible - because the server is not available, or because there is no internet connection rather than waiting for the Ajax callback to fail after it times out. Also, if there is an available internet connection, but the connection is slow, you might want to prevent the user from synchronizing and you might want to display a message telling the user to try again later when there is a faster connection.

In this video we show how this can be done.

Watch video

Date added: 2020-03-29
UX Component - List Control Filtering a List to Show only Checked Rows In this video we show how a server-side filter can be applied to a List to show only the rows that have been checked.

Watch video

Date added: 2020-04-03
UX and Grid Components - Xbasic Executing "long-running" Xbasic Code Asynchronously in an Ajax Callback When an Ajax callback is made from a Grid or UX component, the server-side code executes synchronously. The client will wait for a response from the server. This response is typically sent when the server-side code completes. However, the browser will only wait a certain amount of time for the server to send a response. If the server-side code takes a long time to execute, the browser will likely have stopped listening (i.e. the Ajax request will time out) for a response. Furthermore on IIS (which includes Alpha Cloud), as soon as the browser stops listening for a response the server will stop executing the server-side code.

Because of all of the above, it is not appropriate to execute 'long-running' server-side code in an Ajax callback, unless the code can be run asynchronously.

In this video we show how you can run Xbasic code asynchronously in an Ajax callback. We also show how you can make periodic callbacks to the server to get the status of the asynchronous Xbasic.



Watch Video - part 1
Watch Video - part 2

Date added: 2020-04-07
UX Component Using the PhoneGap Shell - V3 Component The PhoneGap Shell - V3 component makes it easy to test Cordova mobile apps on a real mobile device without having to go through the build process to turn your component into a Cordova application.

Watch video

Data added: 2020-04-13

 


 

 

 

UX Component - List Control - Calendar Layout - (This feature is still under development and requires a Feature Key in order to enable it. We are making an early version of the feature available so we can get feedback from the community). To request a feature key, go to Help, send an email to  enhancementrequests@alphasoftware.com with "List Calendar Feature Key" in the subject.

The Calendar layout is a view of the data in a List See video:

https://www.screencast.com/t/dvLrLJNmhG1

 

 

Features

Build 7618

UX Component - Sample Comonent - PhoneGap Shell V3 - The PhoneGap-Shell V2 sample component has been updated. It is now called PhoneGap-Shell V3.

This component is ideal for developers who are building Cordova mobile applications. It allow you to test your application on a real device without having to go through the time consuming process of building a Cordova app.

The improvements to V3 of this component include:

When you add a new component to the shell, you can specify the associated server. When you select the component, the corresponding server is automatically selected.

Previously, you could register as many servers as you wanted but before you selected an component you have to first ensure that the appropriate server was selected.

Watch video

 

NOTE: You can install the PhoneGap Shell component on your mobile device without having to build it yourself. Go to the App store or Play store and search for Alpha Shell.

 

 

 

UX Component - Generating QR Codes for use with the PhoneGap Shell V3 Component - When you are using the PhoneGap Shell component on your mobile device you have to type in component names and server names when you want to register a new component or server. Typing on a mobile device can be quite tedious and so you can generate a QR code which can be scanned. To generate the QR code, open the UX builder, click the More... button and select the Alpha Shell QR Codes command. This will open a dialog where you can generate the appropriate QR codes.

 

 

 

UX Component - ViewBox Control - Wrapper - You can now wrap the ViewBox layout in a template that allows you place static (i.e. non-scrolling) content around the ViewBox layout. For example, you might want to put a static header above some ViewBox content. When the ViewBox content is scrolled, you want the header to remain fixed in place.

 

 

To define a ViewBox wrapper, check the Use wrapper property and then define the Wrapper HTML property.

The Wrapper HTML must include a div element with an attribute called a5-layout-target and the value of this attribute must be set to true. This is the div where the ViewBox layout will be injected

 

For example:

<div a5-layout-target="true"></div>

 

Build 7600

 

Application Server - 'Long-running' Server-side Code - Running Xbasic Code Asynchronously - When you make an Ajax request, the server-side code that handles the request runs synchronously. That means that the client (i.e. the browser) waits for a response that is typically sent when the server-side code that handles the Ajax request completes. (The exception to this is if you have turned on Chunked responses in your Ajax callback, in which case the server can send back responses to the client while it is executing the code to handle the Ajax callback).

In some cases your Ajax callback will trigger server-side code that might be "long running" and you do not need to have the client wait for a response. In these cases you might want to run the server-side code asynchronously. (Ideally, the client should still be able to make occasional Ajax callbacks to check on the "status" of the long-running job).

This can now be done by using a new Xbasic helper function, a5_run_async_xbasic() to run some Xbasic code asynchronously.

The syntax for this function is:

c result = a5_run_async_xbasic(c xbtorun as c, c baseURL [, s3connectionString = ""])

 

Where

 

NOTE: The Xbasic code that runs asynchronously must complete within 15 minutes.


Watch Video - part 1
Watch Video - part 2

 

Here is a typical use case: Say you have a button on a UX or Grid component that runs several long-running reports. When the user clicks the button they need to initiate the job, but they don't need to wait for the job to complete. However, you might want to let the user click another button to find out what the "status" of their long-running job is. This status might be "waiting","running (completed task x of y)", "completed", or any other status that you want to define.

 

Here is some sample Xbasic that runs reports and then saves the reports as PDF files in a S3 bucket. The code runs the same report multiple times (each time filtered on a different country) and then uploads the resulting PDF files to a S3 bucket.

So, when the Xbasic has completed, the S3 bucket will have file for each country. For example:

report_USA.pdf

report_UK.pdf

report_Austria.pdf

etc.

 

NOTE: This sample Xbasic makes the following assumptions:

 

The steps to implement this use-case are as follows:

 

 

Typically, your Xbasic code will update status information as it is executing by writing to the web repository table (using the Job id as the key). To write to the web repository table, use the function:

a5w_SaveWebAppRepository("the_job_id_guid","the_job_status")

 

Assuming that your Xbasic code update the web repository table while it is executing, you can finnd out the status of your job by makin an Ajax callback and executes code like this:

a5w_GetFromWebAppRepository("the_job_id_guid")

 

Here is the Xbasic code that must be run asynchronously:

 


on error goto failed

dim rn as c

'name of the report to run
rn ="rds_customers.a5rpt"
dim cs as c = "connection_string_to_the_s3_bucket_where_the_reports_should_be_saved"

'The xbasic code can reference the variable '__guid' -- this is the id of the job

'save the status of the job in the webrepository table
a5w_SaveToWebAppRepository(__guid,"Job has been registered")

'list of countries for which the report should be printed

dim json as c
json = <<%xstr%
[
{"Country" : "Argentina"},
{"Country" : "Austria"},
{"Country" : "Belgium"},
{"Country" : "Brazil"},
{"Country" : "Canada"},
{"Country" : "Denmark"},
{"Country" : "Finland"},
{"Country" : "France"},
{"Country" : "Germany"},
{"Country" : "Ireland"},
{"Country" : "Italy"},
{"Country" : "Mexico"},
{"Country" : "Norway"},
{"Country" : "Poland"},
{"Country" : "Portugal"},
{"Country" : "Spain"},
{"Country" : "Sweden"},
{"Country" : "Switzerland"},
{"Country" : "UK"},
{"Country" : "USA"},
{"Country" : "Venezuela"}
]
%xstr%
dim p as p
p = json_parse(json)
dim i as n
dim count as n
count = p.size()
for i = 1 to count
    'save the current status of the job in the repository
    dim msg as c
    msg = "Printing report " + i + " of " + count + " (" + p[i].country + ")"
    a5w_SaveToWebAppRepository(__guid,msg)
 

    'define the filter for the report
    dim o as p
    o.filter = "country = '"+p[i].country+"'"

    'get a temporary filename where the report will be saved
    dim fn as c
    fn = a5_GetTempFilename("pdf")
    'print the report to a temporary pdf file
    fn = a5w_report_saveas(rn,"Pdf","","",fn,null_value(),null_value(),null_value(),o)
    if file.exists(fn) then

        'if the report succeeded (i.e. the file fn exists), then upload it to the S3 bucket
        dim b as b
        b = file.to_blob(fn)
        'save the report in a s3 bucket
        dim objectname as c = "report_" + p[i].country + ".pdf"
        a5Storage_saveData(cs,b,objectname)
    else
        dim objectname as c = "FAILED_" + p[i].country + ".txt"
        dim b as b = "failed"
        a5Storage_saveData(cs,b,objectname)
    end if
next i
 

'the job is done, update the status in the web repository
msg = "Completed"
a5w_SaveToWebAppRepository(__guid,msg)

end
failed:

'error handling in case there is an error.


dim b as b
b = error_text_get() + " line: " + error_line_get()
dim msg as c
msg = "Error: " + b
a5w_SaveToWebAppRepository(__guid,msg)

 

'create an object in the S3 bucket with information about the error
a5Storage_saveData(cs,b,"error.txt")
 

 

 

 

 

Build 7598

UX Component - List with Detail View - Incremental Refresh - The Incremental Refresh action does not update dirty rows in the List (so as not to blow away unsynchronized data), but now it will also not update rows that have pending edits (i.e. the List Detail View has been edited, but not yet saved back to the List)

 

UX Component - List Control - Checkbox Column - List Actions - Action JavaScript - A new action has been added to the List Controls Action in Action Javascript. You can now filter the List to show only the rows that have been checked. (The List must be based on a SQL data source and it must have the checkbox column turned on).

Watch video

 

 

NOTE: When you execute the action, and the filtered list is returned, all of the rows in the List will be checked. If you uncheck all rows and then execute the action again, the List returns to its original state.

 

UX Component - Edit-combo - User Must Select From List - A blank item is now automatically added at the top of the List so that the user can de-select a previous selection. This is also implemented for List in-place editing.

 

UX Component - Dropdown Boxes - Javascript - You can now populate the choices in a Dropdown Box using Javascript.

 

Watch video
Download component
 

 

To specify that you want to call a Javascript function to populate the Drowdown box, select the Static option in the Choice builder and enter the special syntax:

javascript:name_of_your_javascript_function

Your Javascript function should return an array of choices. If you want the to specify different display and stored values, your function should return an array of arrays in which each array item is an array with the display value and the stored value. For example:

 

function choices() {

    return [['alpha','A'],['beta','B'],['gamma','G']]

}

 

 

UX Component - Ajax Callbacks - New options have been added to the Action JavaScript Ajax Callback Action. You can now check if the Alpha Anywhere server is available before making a callback. You can also check the speed of the internet connection before making a callback.

Watch video

The Alpha Anywhere server might not be available even if an internet connection is available. Checking to see if the Alpha Anywhere server is available will typically be much quicker than waiting for an Ajax callback to time out.

To turn on the option to test if the Alpha Anywhere server is available check the Check if server is available property in the Ajax Callback Action builder (see image below).

When you turn this property on you can specify how long to wait for a response from the server before concluding that the server is not available. To specify the time to wait, set the Timeout property. By default this property is set to 300 ms. That means that if the server does not respond within 300 ms, the server is considered to not be available. In that case, the JavaScript specified in the Server not available Javascript property will be executed and the Ajax callback will not be sent to the server.

 

 

The option to perform a speed test before making an Ajax callback is only available if the option to check if the server is available has been turned on.

To turn on the speed test feature, check the Perform a speed test before sending the Ajax reguest property. When you turn this property on you can specify how much data to send to the server (see the Amount of data to send property) to perform the speed test. By default this is set to .1MB (i.e. 100K). You must also specify a maximum time  (see the Maximum duration property)  in which the server must respond. If the server does not respond within the specified amount of time, the speed test is considered to have failed. In this case, the JavaScript specified in the Speed test failed JavaScript property will be executed and the Ajax callback will not be made.

 

Javascript {dialog.object}.savelListEdits() Method - New Ajax Options - You can now specify additional options for this method to control the behavior of Ajax callbacks.

 

The additional options are specified in the optional ajax object and are:

 

Example:

 

{dialog.object}.saveListEdits('LIST1',
{
    rows: 'allRows',
    chunked: {allow: true},
    ajax: {
        onAjaxFail: function() { alert('Unable to sync.'); } ,
        onDeviceOffline: function() { alert('Unable to sync. Device is offline.'); } ,
        onServerNotAvailable: function() { alert('Unable to sync. Server is not available');}
    }
    }

);

 

Build 7574

List - Search Part - Delay populate till active search- If a List control has a Search Part and the Search Part sets the Delay populate till active search property then if you apply a filter to the List and the filter is blank, the List will now no longer be populated. Previously, the List would populate with all of the rows in the List's data source.

Grid and UX Builder - Working Preview and Live Preview - Preview mode now uses the Chrome browser. The option to preview using Internet Explorer has been removed.

The options to open the component in Internet Explorer and Safari have been removed from the menus.

Build 7572

Server-side Date and Datetime Format - Project Properties - You can now specify a server-side date and datetime format in the Web Project Properties dialog.

 

 

 

These properties are particularly useful for applications that are deployed on Alpha Cloud, because Alpha Cloud runs with regional setting set to MM-dd-yyyy format. That means that if you are moving your application from a self-hosted server (where you control the regional settings) to Alpha Cloud, you can change the server-side date and datetime format in one place, rather than having to go to each component and setting the server side display format in the component.

 

 

Bugs

 {dialog.object}.json_to_excel() Method - Fixed an issue when the JSON data was an object with multiple arrays.

AlphaDAO - Time fields - Fixed a regression with time fields.

UX Component - PDF Viewr Control - Panel Cards - Drag scrolling - Fixed an issue with drag scrolling the PDF Viewer when on a mobile device if the PDF viewer was inside a Panel Card.

Grid Component - Enable Expression - Radio Button Controls - Fixed a regression.

UX Component - List Control - Import - Dynamic Connection Strings - Import action would fail if the List used a dynamic connection string.

UX Component - Client-side show/hide expresions - Control Labels - Fixed a regression where the control label was not hidden when the control itself was hidden.

Grid Component - Cascading Dropdown Controls - Fixed a regression.

UX Components - Repeating Sections - Client-side show/hide expressions - Fixed a regression.

Web2Cal - If the event data contained a \ character, the UX component for editing the event would not display.

UX Component - List with Detail View - Parent/Child - GUID Primary Keys - If a UX contained two List and both Lists were based on SQL tables and both lists used GUIDS as their primary key, and the Lists had a parent-child relationship, then entering a new record a into the parent List and also into the child List and then synchronizing the Lists would fail. If the parent List was synchronized before the child record was added the synchronization would succeed.