Web Project Settings

IN THIS PAGE

Description

Different web project settings available in Alpha Anywhere

Run-time Properties

Project style

  • Project style

    Specify the name of the style for all components in the project.

    In each individual component, you must specify the style name as <ProjectStyle>

    You can perform a global update of your components to change the style name to <ProjectStyle> by selecting Edit, Bulk operations from the menu when the Web Projects Control Panel has focus.

  • Applying compact and pulse effects

    If you are using a style such as "Alpha" or "Alpha-Green", you can specify that the compact option or pulse effect should be used in the Project style setting. For example:

    Alpha-Amber:compact
    Alpha:pulse
    Alpha-Grey:compact,pulse

    This will apply the compact and/or pulse effect to every component that uses the <ProjectStyle> as its Style name.

Project connection string

  • Connection string

    A connection string that can be used throughout a project using the <default> keyword. This is similar to how the Project Style can be used throughout your application. Using the default project connection string allows you to modify the connection string in one place and have it update everywhere.

    The default connection differs from using a named connection in that <default> can be either a named connection string (e.g. "AADemo-Northwind") or an ad-hoc connection while a named connection is the saved connection definition for connecting to a data source.

    <default> is supported everywhere you need to specify a connection string.

    To use the default connection string in an Xbasic script, use the cn_open() method. For example:

    dim cn as sql::connection
    dim flag as l
    flag = cn_open(cn,"<default>")

    You can also use the default connection string with the SQL::Connection open method. For example:

    dim cn as sql::connection
    dim flag as l
    flag = cn.open("::name::<default>")

Web site defaults (Alpha Cloud and IIS Only)

These settings only apply to Alpha Cloud and IIS.

  • Default page

    Select the default page to be returned when no page is specified in the request. This value is only used when publishing to an IIS server. See the Xbasic server settings for its list of default page names.

  • Session lifetime (minutes)

    Enter the number of minutes a session will remain active on the server without any requests from the user. A session will automatically end on the server if no requests are received from the user in this amount of time. This value is only used when publishing to an IIS server.

  • Max upload size in MB

    The maximum file upload size. This is specified in MB. The default is 100. This value is only used when publishing to an IIS server.

  • Authentication cookie name

    The name of the cookie that stores encrypted authentication information.

  • Session cookie name

    The name of the cookie that stores the user's session ID.

  • Cookie SameSite value

    The Cookie SameSite value specifies how cookies are served from the Application Server for cross-origin requests. Some third-party embedded services, such as a payment processor, use cookies to perform tasks such as back to your site.

    Alpha Anywhere mobile applications on iOS and Android use cookies to keep track of the user's session. Because the app is running on the user's device and not on the application server, these cookies are viewed by the device as third-party cookies even though they are part of your application.

    Third-party cookies will be blocked by default unless the Cookie SameSite value is configured to allow them. By default, the SameSite value is set to "Strict". This means cookies will not be sent to third-party sites.

    You can allow third-party cookies by setting the SameSite value to "Unset" or "None". All available settings are listed below.

    To learn more about Same Site cookies and solutions for common warnings, see SameSite Cookies (MDN)

  • Mode
    Description
    Unset

    The SameSite attribute is not set and is not sent with requests. Required for Cordova mobile apps.

    None

    The SameSite attribute is set to "None". Cookies are sent in all contexts, including cross-origin. Requires SSL.

    Lax

    The SameSite attribute is set to "Lax". Cookies are allowed to be sent in top-level navigation and in GET requests to third-party websites.

    Strict

    (Default) The SameSite attribute is set to "Strict". Cookies are only sent in first-party context. Cookies are not sent to third-party websites.

    You must set the Same Site policy to Unset if you are deploying Cordova Applications that must communicate with the Application Server.

  • Stack options

    Allows you to configure how IIS processes requests. See Optimizing Memory Usage on IIS for more information.

  • HTTP to HTTPS redirect

    Allows you to configure how IIS redirects HTTP requests to HTTPS requests. This also lets you configure Strict-Transport-Security (see Strict-Transport-Security (MDN)), which tells the browser to make all requests to the application using HTTPS, even if HTTP is used in the address.

    There may be cases when automatic HTTP to HTTPS redirection should not be done. For example, LetsEncrypt can use HTTP-01 Challenge (see Challenge Types (LetEncrypt)) to prove domain name control that is done using HTTP. LetsEncrypt sends a request in the form http://<YOUR_DOMAIN>/.well-known/acme-challenge/<TOKEN>. In this case, requests for .well-known/acme-challenge/ should be allowed over HTTP. A redirect exclusion needs to be created for files in that path. The following regular expression allows HTTP requests to .well-known/acme-challenge/:

    \.well-known/acme-challenge/.*
    HTTP to HTTPS automatic redirect exclusion regular expression.
    HTTP to HTTPS automatic redirect exclusion regular expression.
  • HTTP01-Challenge support

    HTTP01-Challenge is used by some HTTPS certificate vendors as one of some different ways for proving domain/server ownership. This requires the site to have a well known place for the certificate vendor to get a token file. Enabling this support will create the necessary folder tree and security permissions for allowing access to the folder path.

    Choose either LetsEncypt or Custom from the challenge vendor list. If Custom is selected, you then need to enter the well known path used by the certifcate vendor. The path is relative to the web site root.

    .well-known\challenge
    HTTP01 challenge configuration
    HTTP01-Challenge configuration.

Aex files

  • File list

    Property name: aexFiles.fileNames Specify the name of any .aex files that you want to load when this project is run. AEX Files specified here are loaded automatically when the application is run. It is not necessary to use the a5w_load_aex() function.

File Download

  • Allowed filenames

    Enter a comma delimited list of allowed files that can be downloaded from the server. Enter filename patterns using wildcard characters (* and ?). To allow any type of file, enter *.* For example, if you enter: a5*.xls,a5*.pdf - Only .xls files and .pdf files that start with 'a5' can be downloaded. If you only want to specify a list of blocked filename patterns, leave this property blank, or enter *.*.

  • Disallowed filename

    Enter a comma delimited list of files that can not be downloaded from the server. Enter filename patterns using wildcard characters (* and ?).

  • Allowed folders

    Enter a comma delimited list of folder names from which files can be downloaded. You can use wildcard characters (* and ?) in the name. Example: *\images,*\pdf - would allow user to download from a folder called 'images' or 'pdf' on any drive. d:\images would only allow download from the 'images' folder on drive D on the server.

    <UserSessionFolder> is not supported in Alpha Anywhere.

    If you leave this blank (not recommended) then files can be downloaded from any folder.

    You can use the <ApplicationRoot> placeholder in the folder name you specify. e.g. <ApplicationRoot>\DownloadFolder

Javascript Initialization

  • Initialization Javascript

    Custom JavaScript to run before loading any pages in an application.

  • Template format directives

    Client-side templates are used in the List and ViewBox controls to define the control's layout. Format Directives are used in client-side templates to transform data into a specific format. For example, the number directive formats a numeric value a as string. Using number, you can translate a numeric value into a phone number or price. The Template format directives can be used to create custom format directives that can be used throughout a project.

    Custom format directives are defined using JavaScript. You can insert an example directive in the Template - User Defined Format Directives dialog using the Insert sample code below the Javascript Code text area. The link inserts the code for the Credit Score example described in the dialog:

    if(Number(v) < 100 ) return 'High risk';
    else return 'Low risk';

    Your JavaScript can reference v, which is the value being formatted. You must return the formatted value using the return keyword.

    Example Credit Score template defined in Template format directives
    Example Credit Score template defined in Template format directives
  • The template is inserted into the template for a List or ViewBox using syntax :templateName after the name of the field to format. For example, to use the example Credit Score format above, named "formatCreditScore", for a field called creditScore, you would enter the following:

    {creditScore:formatCreditScore}

    You can insert custom formats using the Format directive link. The Custom option lists the format directives defined in the Template format directives settings.

    Inserting a custom format directive
    Inserting a custom format directive
  • Creating Custom Display Formats for Client-side Templates

    Client side templating is used in many different places in a UX to display data. For example, it is used in Lists, ViewBoxes, ControlBars, FormViews, etc.

    In this video we show how you can create custom format directives.

    01-22-2021

Javascript Libraries

  • jQuery Core

    Load jQuery core Javascript Library. You can choose where the library is loaded from. Alpha Anywhere has a built-in version of this library, or you can load it from the Google Content Delivery Network, or the jQuery Content Delivery Network. When you load from Google, you must specify the version you want to load. When you load from the jQuery CDN, the latest stable release is automatically loaded.

  • jQuery Core Version

    Specify the version number you want to load

  • jQuery UI

    Load jQuery UI Javascript Library. Requires jQuery Core. You can choose where the library is loaded from. Alpha Anywhere has a built-in version of this library, or you can load it from the Google Content Delivery Network.

  • jQuery UI Version

    Specify the version number you want to load

  • Links

    Specify a list of Javascript libraries to link

  • Include Image Gallery

    Specify if the Image Gallery Javascript libraries should be loaded. If you use the Image Gallery anywhere in your application you must check this option. NOTE: If this option is checked, then you must also check the options to load jQuery core.

  • Include Google JSAPI library

    Specify if the Google Javascript API library should be loaded. This is needed if you use the Google visualization library in the UX component.

  • Include JitsiMeet library

    Specify if the Jitsi Meet library should be loaded. The Jisti Meet library is required if any components in your project contain a Jitsi Meet control.

  • Cordova/PhoneGap libraries

    If you are building a hybrid mobile application that requires a Cordova Javascript library, specify where the Javascript should be loaded from. Javascript can be loaded from one of the following locations:

    BuiltIn

    Use the built-in version of either the iOS or Android library

    Local

    Use a version that is loaded from a file in the web root

  • If the file is loaded from a "Local" folder, it must be loaded from a folder that follows the required naming convention:

    Javascript\Cordova\IOS\currentVersion\cordova.js, Javascript\Cordova\IOS\2.8.0\cordova.js, Javascript\Cordova\Android\currentVersion\cordova.js, Javascript\Cordova\Android\2.8.0\cordova.js
  • Include CKEdit HTML Editor Javascript library

    If your component uses the CKEdit HTML editor you must check this box to load the necessary Javascript and CSS libraries.

Dates

  • Switch year

    The Switch year defines how to interpret two-digit years in a date. If the year is greater than the switch year, it will be interpreted as being in the 1900s. For example, "12/25/22" will be interpreted as December 25, 2022 while "03/17/59" is interpreted as March 17, 1959.

    Leave this property blank to use the default switch year. The current default switch year is "30".

    It is recommended that you use four digit years rather than two digit years in your applications.

  • Server-side date/time format for UX and Grid components

    The date/time format to use on the server. The date/time is specified using Xbasic date/time formatting elements. For example, yyyy-MM-dd 0h:0m:0s. Leave blank to use machine regional settings. See Date and Time Format Elements for more information.

    This property is useful for applications deployed on Alpha Cloud because Alpha Cloud runs with regional setting set to MM-dd-yyyy format. If you are moving your application from a self-hosted server to Alpha Cloud, you can change the server-side date/time format here instead of editing every component to set the date/time format.

  • Server-side date format for UX and Grid components

    The date format to use on the server. The date is specified using Xbasic date formatting elements. For example, yyyy-MM-dd. Leave blank to use machine regional settings. See Date and Time Format Elements for more information.

    This property is useful for applications deployed on Alpha Cloud because Alpha Cloud runs with regional setting set to MM-dd-yyyy format. If you are moving your application from a self-hosted server to Alpha Cloud, you can change the server-side date format here instead of editing every component to set the date format.

CSS Libraries

  • jQuery CSS

    Specify which jQuery UI CSS library should be loaded. These libraries are loaded from the Google Content Delivery Network.

  • Links

    Specify a list of CSS libraries to link in the application.

Resource Providers

  • Named Providers

    A Named Provider is used to connect to an external service that can be used for user authentication and access to other resources such as social media. Resource providers such as Google and Facebook can be used for user authentication or access services available from the provider, such as calendars and documents.

    A user can log onto a system using their credentials from the provider in place of the user name and password in the web security system.

    Named Resources can be created for the following providers in Alpha Anywhere:

    • Box (OAuth)
    • Dropbox (OAuth)
    • Facebook (OAuth)
    • Google (OAuth)
    • LinkedIn (OAuth)
    • Live Connect (OAuth)
    • Salesforce (OAuth)
    • Spotify (OAuth)
    • Twitter (OAuth)
    • Googleservice (API)
    • SalesforceService (API)
    • Twillio (API)
  • Videos

    Creating a Named Resource for Salesforce

  • Alternative Login - Creating a Named Provider

    See Alternative Logins for more information.

Webkit (Chrome/Safari) Specific

  • Allow static text selection

    Defines whether or not static text can be selected in a mobile or web application. For mobile applications, this property should be set to .f.. This will prevent static-text on a page from being selected. For desktop applications you might want to set this property to .t. so that users can select static-text.

Stripe Checkout

Settings for configuring Stripe. See the Stripe Genie... to learn how to integrate Stripe into your applications.

  • Define keys

    If your application uses Stripe Checkout, you can specify your Stripe API key here.

E-mail Settings

  • SMTP Server

    The URL or IP Address for the SMTP server for sending email.

  • SMTP server port

    The port used by the SMTP server.

  • SSL Option

    Defines the SSL option to use when sending email. If SSL is not used, leave this property blank. Example settings: SSL, TLS.

  • E-mail account user name

    The user name for the email account used to send email.

  • E-mail account password

    The password for the email account used to send email.

  • From address

    The default from address for emails sent from the application. If using SparkPost or SendGrid, your verified sender address.

  • From alias

    The default friendly name for the from address for emails sent from the application.

  • SparkPost/SendGrid key

    If sending email using SparkPost or SendGrid, your SparkPost or SendGrid API Key. If using SendGrid, prefix the SendGrid API key with sendgrid:. If set, Alpha Anywhere will use the API key specified in the SparkPost key property when calling the email_send_sparkpost() Xbasic function if no key is specified in the function call.

    When defining an Email action, either using Action Javascript or Action Scripting, specifying a value of <Project> or leaving the value blank for the SparkPost key property will use the API key specified in the Web Project Settings.

    Emails sent using SparkPost or SendGrid are sent using the SparkPost or SendGrid API. Your API key is required to send emails using SparkPost or SendGrid.

    You can optionally specify the From address and From alias above. The From address should be your verified sender for your SparkPost or SendGrid service. Sending email using SendGrid requires your verified sender address for the account. If not supplied here, you will need to provide your verified sender address in the action or script that calls the service.

    All other settings are ignored.

    For more information about SparkPost API keys, see SparkPost API Keys.

    For more information about SendGrid API keys, see SendGrid API Keys.

  • Default sending method

    The method to use when sending email. You can choose Internal to use Alpha Anywhere's internal email functions or SparkPost to use the SparkPost or SendGrid web service.

E-mail Outbox

The E-mail Outbox is a table used to store a copy of email messages sent from a web application.

images/emailOutboxSettingsProperties.png
  • Table type

    Defines the table type. This can be DBF or SQL (recommended).

  • Connection string

    If the Table type is SQL, the Connection string property must be defined. This property specifies what connection string should be used to connect to the database that contains the email outbox table.

  • Table name

    The Table name defines what table in the data source is the email outbox table. You can use the Create E-mail Outbox Table link in the Define E-mail Outbox Table dialog to generate a table in the destination database if one doesn't exist.

    Alternatively, you can create the table yourself. The email outbox table must have the following structure:

    Field name: ID, Type: Numeric(8), Primary key: True, Allow Nulls: False, Is Auto-increment: True
    Field name: wasSent, Type: Character(3), Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: errorText, Type: Character(255), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: dateStamp, Type: DateTime, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: subject, Type: Character(255), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: Message, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: SentTo, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: CC, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: BCC, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: Attachments, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: Comments, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: sent_by, Type: Character(255), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: sent_by_alias, Type: Character(255), Primary key: False, Allow Nulls: True, Is Auto-increment: False
  • Sequence name

    Specify the sequence name for the table. The Sequence name is only needed for databases such as Oracle and PostgreSQL that use sequences for auto-increment fields.

  • Field map

    The field map defines how the fields in the table map to the required email outbox fields. Use the Auto map fields link to automatically map the fields. Any fields that don't use the same name as the ones shown below need to be manually mapped:

    Field Name
    Field Map Property
    ID

    Primary key field

    wasSent

    WasSent field

    errorText

    Error Text field

    dateStamp

    DateStamp field

    subject

    Subject field

    Message

    Message

    SentTo

    Sent To

    CC

    CC

    BCC

    BCC

    Attachments

    Attachments

    Comments

    Comments

    sent_by

    Sent_By field

    sent_by_alias

    Sent_By Alias field

  • images/emailOutboxSettingsProperties2.png
    The Define E-mail Outbox Table dialog is shown when the smart field button is clicked for any of the E-mail Outbox properties.

Audit table (for SQL tables)

Auditing can be enabled to keep track of edits made to SQL tables in an application. Information about each Insert, Update and Delete is kept in the Audit table. This table keeps track of the type of edit, the user id of the person making the edit, the name of table that was edited, and the old and new value of each field that was edited.

  • Video: Auditing Table Edits

    In many applications it is desirable to keep track of every edit made to a SQL table so you can know what fields were changed, who made the edit and when the edit was made. This is often achieved by added update, insert and delete triggers to the SQL database. But in cases where it is not possible to modify the database, you can use the built-in auditing feature in Alpha Anywhere.

    In the first video we show how the auditing feature is set up and used.

    In cases where updates to SQL tables are made in your own Xbasic code (as opposed to from UX and Grid components), it is necessary to manually update the audit log. In the second video we show how this is done.

    2018-15-06

To turn on the Auditing feature, check the Keep track of edits to tables made through Grid and UX components property.

images/audit1.gif

Once you do this, you will be able to specify the connection string to the database where the Audit table is stored. You can either map an existing table, or create a new table.

images/audit2.gif

By default, the User Id of the user who made the edit to a table is obtained from the Alpha Anywhere security framework (by evaluating the context.security.currentUser expression). However, if you are not using the Alpha Anywhere security framework, you can define a custom expression to get the user id of the person who made the edit.

In the case where you are making updates to SQL tables in your own Xbasic code, you will need to manually update the audit log table. There are two helper function in Xbasic to make this easy:

For example, the following code updates a table and also updates the audit log:

dim cn as sql::Connection
cn.open("::Name::AADemo-Northwind")
dim args as sql::arguments
args.add("primaryKey","ALFKI")
args.add("title","Manager")


dim sql as c
sql = "update Customers set ContactTitle = :title where CustomerID = :primaryKey"

'capture the BEFORE update values
dim dataJson as c
dataJson = a5Helper_getAuditInfoFromSQLStatement(cn,sql,args.xml)

flag = cn.Execute(sql,args)

'write to the auditing table
a5Helper_writeToAuditingLog(cn,"Update",dataJson,"CustomerID","ALFKI")
The Audit table can grow to be very large in a large application used by many people. You might want to implement a strategy to purge old records from the audit table from time to time.

A complete list of properties for configuring table auditing are listed below:

  • Keep track of edits to tables made through Grid and UX Components

    If checked, enables table auditing in Grid and UX Components.

  • Connection string

    The Connection string property defines the connection to the SQL database where the audit table is defined. If the audit table doesn't exist, you can create one using the Create Audit Table link at the bottom of the Define Audit Table dialog.

    images/auditTable1.png
  • Table name

    The Table name property defines the table in the database where the audits are written. If no table exists in your database, you can create the table from within Alpha Anywhere using the link. Using this link will both create the table and populate the Field map, as well.

    If you manually create the audit table, the table must contain the following fields:

    Field name: id, Type: Numeric(10), Primary key: True, Allow Nulls: False, Is Auto-increment: True
    Field name: operation, Type: Character(20), Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: UserId, Type: Character(100), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: dateStamp, Type: DateTime, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: data, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: databaseTableName, Type: Character(100), Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: primaryKeyFields, Type: Character(200), Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: primaryKeyValue, Type: Character(200), Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: connectionStringToDatabases, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: comment, Type: Character(100), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: userfield1, Type: Memo, Primary key: False, Allow Nulls: True, Is Auto-increment: False
  • Field map

    The Field map defines a mapping between columns in the audit table and the data collected and written to the table by Alpha Anywhere. The Auto map fields link can be used to automatically map fields in the table to the audit fields.

  • Expression for User Id

    Defines the user Id to log in the audit table. If you use the Alpha Anywhere Security Framework, Context.Security.CurrentUser will be used to retrieve the user Id.

    images/auditTable2.png
  • If you are not using the Alpha Anywhere Security Framework, you can define a custom expression for the user Id. In many cases, the user Id is stored in a session variable that is set when a user logs into the system. For example, Context.session.userid. To set the Expression for User Id to use this session variable, you would uncheck the Use security framework to get User Id? and enter the following in the Expression to evaluate to get User Id text box:

    Context.session.userid

User Defined Fields

You can add a user defined field to the audit table to capture any additional information that you want at the time the audit table is updated. If you set the value in a special session variable called session.__audit_userfield1, the value in this variable will be written to the user defined field when the audit table is updated. If you want to store a significant amount of information in this field, consider creating a string of JSON data. The JSON data can have a large number of properties.

Extended user security info

The Extended user security info settings are used to configure the Extended User Information table. Web security tables in the Alpha Anywhere Security Framework have a fixed schema and cannot be modified. If you need to store additional information about a user that the Web Security Framework doesn't include in the web security tables, you can use an Extended User Information table.

The Extended User Information table can contain any information you would like to collect and store about a logged in user. The table, at a minimum, must include a User ID field, which is used to link the Extended User Information table records to a user in the security framework.

Property
Description
Connection string

The Connection string property defines the connection to the SQL database where the extended user information is stored.

Table name

The name of the Extended User Information table.

Userid field name

The field in the table that contains the user id.

If you do not have a table already in your database for storing the Extended User Information, you can create one directly from Alpha Anywhere using the Create Extended User-information Table link in the Extended User Information Table dialog. The Default field list link in the window used to define the fields in the Extended User Information table can be used to generate a set of suggested fields to include in your table in addition to the User ID:

Default field list
UserId|c|100||PrimaryKey
Firstname|c|100
Lastname|c|100
AvatarURL|c|250
Company|c|100
Department|c|100
SecurityGroups|c|250
OtherOptionsJSON|M

All fields and field names are optional, however you must include a field that stores the user ID.

Repository Settings

images/repositorySettingsProperties.png

A repository is a table (either .dbf or SQL) where a web application can read or write data. The data are typically items such as email templates, or saved queries, or other settings. For the most part, the repository is for internal use by components, but developers can also make use of it using the following functions:

For an example of how you can use these functions with the repository table, see the UX_Ad_Hoc_SQL_QueryBuilder UX template.

The following properties are available for configuring the Repository Settings:

  • Table type

    Defines the table type. This can be DBF or SQL (recommended).

  • Connection string

    If the Table type is SQL, the Connection string property must be defined. This property specifies what connection string should be used to connect to the database that contains the repository table.

  • Table name

    The Table name defines what table in the data source is the repository table. You can use the Create Repository Table link in the Define Repository Table dialog to generate a table in the destination database if one doesn't exist.

    Alternatively, you can create the table yourself. The repository table must have the following structure:

    Field name: key, Type: Character(100), Primary key: True, Allow Nulls: False, Is Auto-increment: False
    Field name: objectType, Type: Character(40), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: dateStamp, Type: DateTime, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: componentGUID, Type: Character(40), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: userId, Type: Character(40), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: data, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: securityGroups, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
  • Field map

    The field map defines how the fields in the table map to the required repository fields. Use the Auto map fields link to automatically map the fields. Any fields that don't use the same name as the ones shown below need to be manually mapped:

    Field Name
    Field Map Property
    key

    Repository Key field

    objectType

    Object Type field

    dateStamp

    DateStamp field

    componentGUID

    ComponentGUID field

    userId

    UserId field

    data

    Data

    securityGroups

    Security Groups

images/repositorySettingsProperties2.png
The Define Repository Table is shown when the smart field button is clicked for any of the Repository Settings properties.

GlobalSettings Table

The Global Settings table can be used to store settings as name-value pairs in a SQL database. Settings can be accessed and managed server-side at runtime throughout the application using the a5_globalSetting_add(), a5_globalSetting_get(), and a5_globalSetting_delete() functions.

Using the a5_globalSetting* functions in the Interative Window.
dim settingName as c = "test"
dim settingValue as c = "This is my test value."

dim result as L
result = a5_globalsetting_add(settingName, settingValue)
? result
= .T.

dim existingValue as c
existingValue = a5_globalsetting_get(settingName)
? existingValue
= "This is my test value."

result = a5_globalsetting_delete(settingName)
? result
= .T.

existingValue = a5_globalsetting_get(settingName)
? existingValue
= ""

The GlobalSettings Table settings are used to configure the Global Settings table.

  • Table type

    Defines the table type. This can be DBF or SQL (recommended).

  • Connection string

    If the Table type is SQL, the Connection string property must be defined. This property specifies what connection string should be used to connect to the database that contains the Global Settings table.

  • Table name

    The Table name defines what table in the data source is the Global Settings table. You can use the Create Global Settings Table link in the Define Global Settings Table dialog to generate a table in the destination database if one doesn't exist.

    Alternatively, you can create the table yourself. The Global Settings table must have the following structure:

    Field name: id, Type: Numeric(10), Primary key: True, Allow Nulls: False, Is Auto-increment: True
    Field name: settingName, Type: Memo, Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: settingValue, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
  • Field Map

    The field map defines how the fields in the table map to the required component security settings fields. Use the Auto map fields link to automatically map the fields. Any fields that don't use the same name as the ones shown below need to be manually mapped:

    Field Name
    Field Map Property
    ID field

    The field that contains the primary key for the table.

    Setting name

    The field that contains the setting name.

    Setting value

    The field that contains the setting value.

SQL Log Table

You can now log all SQL CRUD statements executed by a List with a Detail View, a Grid, or a data bound UX component to a table. The SQL Log table contains the sql that got executed, the arguments that were defined, the result of the command, the error message if the SQL failed, the date and time of the command, and how long it took for the SQL to execute.

To enable SQL Logging, the properties must be configured in Project Properties.

You can dynamically turn SQL logging on or off by setting a value in the enabled field in the table specified in the Remote enable/disable logging table name property.

For example, assume that you have defined a SQL Log table, but have not specified the Remote enable/disable logging table name property. SQL logging is then enabled.

However, if you have specified a value for the Remote enable/disable logging table name property then Alpha Anywhere will query the value of the enabled field in this table. If the enabled field value in the first record in the table is true, logging will be enabled. If the value is false, logging is disabled.

  • Configure using GlobalSettings Properties

    Typically the SQLLog table is configured at design time by setting properties in the Web Project Properties dialog. You can configure the SQLLog table at run-time by setting Global Settings.

    The following Global Settings can be used to configure the SQLLog table:

    Setting
    Description
    sqlLog_table

    The name of the SQLLog table

    sqlLog_connectionString

    The name of the connection string where the SQLog table is stored

    sqlLog_fieldMap

    The field map -- can be blank

    sqlLog_maxAge

    Defaults to 30. records that are more than maxAge days old are deleted from the log when the log is updated.

    If the table is specified, but does not exist, the table will be created.

Component Security

Access to buttons in a TabbedUI's navigation menu can be restricted using security groups. These security settings can be stored in an external database, allowing you to give your users the ability at runtime to change access control in the TabbedUI.

Component Security settings are used to configure the component security settings table where the security group information is stored for a TabbedUI using the Store security groups in database feature.

  • Table type

    Defines the table type. This can be DBF or SQL (recommended).

  • Connection string

    If the Table type is SQL, the Connection string property must be defined. This property specifies what connection string should be used to connect to the database that contains the component security settings table.

  • Table name

    The Table name defines what table in the data source is the component security settings table. You can use the Create Component Security Settings Table link in the Define Component Security Settings Table dialog to generate a table in the destination database if one doesn't exist.

    Alternatively, you can create the table yourself. The component security settings table must have the following structure:

    Field name: ComponentGuid, Type: Character(100), Primary key: True, Allow Nulls: False, Is Auto-increment: False
    Field name: securitySettingsJSON, Type: Memo, Primary key: False, Allow Nulls: False, Is Auto-increment: False
  • Field Map

    The field map defines how the fields in the table map to the required component security settings fields. Use the Auto map fields link to automatically map the fields. Any fields that don't use the same name as the ones shown below need to be manually mapped:

    Field Name
    Field Map Property
    ComponentGuid

    Component GUID field

    securitySettingsJSON

    Security data

Work Queue Table Settings

  • Table type

    Specify the table type for the Work Queue.

  • Connection string

    Specify the connection string to the database for the Work Queue.

  • Table name

    The Table name defines what table in the data source is the work queue table. You can use the Create Work Queue Table link in the Define Work Queue Settings Table dialog to generate a table in the destination database if one doesn't exist.

    Alternatively, you can create the table yourself. The work queue table must have the following structure:

    Field name: ID, Type: K-Guid, Primary key: True, Allow Nulls: False, Is Auto-increment: False
    Field name: CreatedWhen, Type: DateTime, Primary key: False, Allow Nulls: False, Is Auto-increment: False
    Field name: WorkType, Type: Character(50), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: IsLocked, Type: Numeric(1), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: SchedulatedStartTime, Type: DateTime, Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: HandledBy, Type: Character(250), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: IsCompleted, Type: Numeric(1), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: CompletedDateTime, Type: DateTime, Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: Status, Type: Character(100), Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: WorkData, Type: Memo, Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: ErrorMessage, Type: Memo, Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: Message, Type: Memo, Primary key: False, Allow Nulls: True, Is Auto-increment: False
  • Field Map

    The field map defines how the fields in the table map to the required work queue fields. Use the Auto map fields link to automatically map the fields. Any fields that don't use the same name as the ones shown below need to be manually mapped:

    Field Name
    Field Map Property
    Primary key field

    The primary key.

    CreatedWhen field

    Date/time when the entry was added to the work queue table.

    WorkType field

    The work type. E.g. "PrintReport", "SendEmail", "RunScript", etc.

    IsLocked field

    Indicates if the work item is being processed. IsLocked will have a value of 1 during processing.

    SchedulatedStartTime field

    Date/time indicating when to process the work queue item. Most entries will use the current date/time, which signals the item should be processed immediately.

    HandledBy field

    An identifier for the process that handled the event. For example, if multiple instances of Alpha Anywhere are configured to process the work queue, allows you to identify which instance handled the work queue item.

    IsCompleted field

    Indicates whether the work queue item is done processing. Has a value of 1 when the item is complete.

    CompletedDateTime field

    The date/time when the work queue item has finished processing.

    Status field

    Status message indicating if the work queue item has completed successfully.

    WorkData field

    Properties describing the work to be done.

    ErrorMessage field

    If an error occurred during processing, the error message for the error.

    Message field

    A field that can be used to store arbitrary information after the work queue item has finished processing.

Authentication Keys Table Settings

  • Table type

    Specify the table type for the authentication keys table.

  • Connection string

    Specify the connection string to the database hosting the authentication keys table.

  • Table name

    The Table name defines what table in the data source is the authentication keys table. You can use the Create Authentication Keys Table link in the Define Authentication Keys Table dialog to generate a table in the destination database if one doesn't exist.

    Alternatively, you can create the table yourself. The authentication keys table must have the following structure:

    Field name: NamedResource, Type: Character(100), Primary key: True, Allow Nulls: True, Is Auto-increment: False
    Field name: Host, Type: Character(150), Primary key: True, Allow Nulls: False, Is Auto-increment: False
    Field name: ProjectName, Type: Character(100), Primary key: True, Allow Nulls: True, Is Auto-increment: False
    Field name: IsUserSpecific, Type: L, Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: UserName, Type: Character(100), Primary key: True, Allow Nulls: False, Is Auto-increment: False
    Field name: Token, Type: Memo, Primary key: False, Allow Nulls: True, Is Auto-increment: False
    Field name: lastupdated, Type: time, Primary key: False, Allow Nulls: True, Is Auto-increment: False
  • Field Map

    The field map defines how the fields in the table map to the required authentication keys fields. Use the Auto map fields link to automatically map the fields. Any fields that don't use the same name as the ones shown below need to be manually mapped:

    Field Name
    Field Map Property
    Named resource name

    The name for the resource provider.

    Host name

    The host name.

    Project name

    The project name. This value should be unique for each entry in the authentication keys table.

    Is user specific?

    Indicates whether or not all users of the application use the same access token. If true, every user uses the same access token. If false, each user has their own access token.

    User name?

    The name of the user. If the token is an application token, the name will be 'Application'.

    Token field

    The access token.

    Date/time last updated

    The date/time when the authentication keys entry was last modified.

Help Table Settings

  • Table type

    Specify if the Help Table is a .DBF or SQL table.

  • Connection string

    Specify the connection string to the SQL database.

  • Table name

    Specify the table name.

  • Field map

    Specify how the fields in the Help Table table are mapped to the required fields. Only fields that are different from their 'system' value are shown in the map.

Text Dictionary Table Settings

  • Table type

    Specify if the Text Dictionary Table is a .DBF or SQL table.

  • Connection string

    Specify the connection string to the SQL database.

  • Table name

    Specify the table name.

  • Field map

    Specify how the fields in the Text Dictionary Table table are mapped to the required fields. Only fields that are different from their 'system' value are shown in the map.

Offline Data Synchronization Log Table Settings

  • Table type

    ALWAYS SET TO SQL

  • Connection string

    Specify the connection string to the SQL database.

  • Table name

    Specify the table name.

  • Field map

    Specify how the fields in the Data Synchronization Log table are mapped to the required fields. Only fields that are different from their 'system' value are shown in the map.

Application Global Variables

  • Define application variables

    Specify any application global variables. These variables can be seen by every page and component in this application.

Calendar Component

  • License number

    Specify the license number for your Calendar component. The license number in the Calendar component itself should be set to: <GetFromProjectSetings>

PDF Printing Options

  • Use direct to PDF

    If you check this option, all reports that use the PDF option will use the PDFDirect option. This includes overwriting Action Scripting Initial View and Action Javascript Initial view.

    PDFDirect generates PDFs without using the Amyuni Printer Driver. Some PDF Options are not available when using PDFDirect.

    This property is no longer available in Alpha Anywhere build 7661 and newer. All reports will be generated using PDFDirect. Reports can no longer be created using the Amyuni driver.

    How to report PDF reporting issues to Alpha Software

    If your report does not render correctly when printed as a PDF, right click on the report in the Web Project Control Panel and select the Create Bug Report menu option under the Datasources menu. Select a location to store the .zip file and be sure to check the Include Raw Pages option. Send the zip file to [email protected].

  • Use Microsoft XPS printer to generate PDF files

    Specify if the Microsoft XPS printer should be used to generate PDF files. When you use this option, you can specify if the resulting XPS files should be converted to PDF files before being sent to the browser, or if they should be sent to the browser as XPS files.

    This option is not shown if Use direct to PDF is checked.

  • Convert XPS files to PDF before sending to client

    Defines whether or not XPS files should be converted to a PDF format before being sent to the client.

    This option is only shown if Use Microsoft XPS printer to generate PDF files is checked.

    If you choose to send the resulting XPS files to the browser without first converting them to PDF, only Microsoft Internet Explorer will be able to display the file directly in the browser. All other browsers will download the file and you will have to use the local XPS viewer application to see the file.

  • Allow all international characters in free-form reports

    Applies to reports with a SQL data source.

    If unchecked, Alpha Anywhere renders reports using a .DBF table for report data. This legacy reporting logic does not support UTF8.

    This option is not shown if Use direct to PDF is checked.

    If reports use international characters, enable the option for Multilingual support in the PDF Options.

  • PDF Options

    Default settings for creating PDF reports. Settings can be set for individual reports created using Action Scripting, Action Javascript, or Xbasic. Options specified for individual reports override the project default.

    • PDF Options

      Property
      Description
      Multilingual support

      Adds support for international character sets.

      Embed fonts

      Include required fonts in the PDF instead of allowing them to be resolved externally.

      If the font is protected, it can't be embedded; this is often the case for bar code fonts, such as Code39.
      Linearize

      Uses a format that is better for web viewing. This format makes it possible to view the first page of a large PDF before all remaining pages are downloaded.

      Black and white

      Converts all colors to black, white, and gray.

      Convert hyperlinks

      Converts all hyperlinks started with "http://" into live links in the resulting PDF document.

      JPEG Image Quality

      Set the quality of JPEG images; this is a trade-off between image fidelity and size. Low quality uses the highest compression and produces the smallest images. No Compression produces the largest, highest-quality images.

    • Watermark Options

      Property
      Description
      Watermark

      If enabled, prints a watermark on every page in the report. The properties below are also exposed.

      Watermark type

      Specifies how to create the watermark. The options are:

      Text

      Watermark is defined as text, including the font, color, orientation, and position.

      PDF

      Watermark is defined as a PDF. Use this option to display a logo or other image as a watermark.

      Text

      The text to use as a watermark. This property is only available if Watermark Type is set to Text

      Font name

      The font to use for the watermark text. This property is only available if Watermark Type is set to Text

      Font size

      The font size to use for the watermark text. This property is only available if Watermark Type is set to Text

      Orientation

      The rotation of the watermark text in 0.1 degree increments. This property is only available if Watermark Type is set to Text

      Font color

      The font color to use for the watermark text. This property is only available if Watermark Type is set to Text

      Horizontal position

      The horizontal position of the watermark text in 0.1 inch units. This positive value measured from the left edge of the page should take into account the minimum printer margin. This property is only available if Watermark Type is set to Text

      Vertical position

      The vertical position of the watermark text in 0.1 inch units. This negative value measured from the top of the page should take into account the minimum printer margin. This property is only available if Watermark Type is set to Text

      Watermark file name

      The name of a PDF file to use as the watermark. Optionally, click Click to create PDF from Bitmap to display the Create PDF File from Bitmap dialog. This property is only available if Watermark Type is set to PDF

      Foreground

      When enabled, places the watermark above the page text, partially obscuring page content. When disabled, places the watermark below the page text.

    • Encryption Options

      Property
      Description
      Encrypt PDF file

      Check this property if you want to require a password to open the PDF file or set file permissions for the PDF. If enabled, the properties below are also exposed.

      Owner password

      Specifies the text to use as the owner password. Only the owner can change the User password and the document other settings.

      User password

      Specifies the text to use as the read password.

      Can print

      Specifies whether the reader can print the document.

      Can modify document

      Specifies whether the reader can edit the document.

      Can copy

      Specifies whether the reader can select text in the document and copy it.

      Can add notes

      Specifies whether the reader can add notes.

      Use 128 bit key

      Selects between 40 bit and 128 bit encryption. Readers will need Adobe Acrobat version 5 or higher to read 128 bit encrypted files.

    • Other Options

      Property
      Description
      PDF Title

      The title of the PDF. This title is shown in some browser PDF viewers.

    Some PDF Options are not supported when using Direct to PDF.

  • Print timeout (seconds)

    Large PDF reports may take a long time to build and you may want to cancel reports that take too long to create.

    The print timeout cancels any reports that do not completed within the specified time (in seconds). Set the timeout to 0 to allow all reports to run to completion.

    An error will be reported back to the user if a report is cancelled because it exceeded the allowed time.

  • Print timeout message (optional)

    The system will generate an error message if a PDF report times out. Any optional message entered here will replace the system error message if the report times out.

    This option is only shown if Print timeout (seconds) is not zero.

  • Maximum Pages

    Limits the number of pages a PDF report can contain. By default, this value is set to 1000. Set to 0 to allow an unlimited number of pages.

Report Server

  • Disable

    Specify if the Report Server (used for printing PDF Reports in Web Applications) should be disabled. By default (in V12 and above) a 4 core Report Server is automatically enabled. (To license a Report Server that uses more than 4 cores, contact Alpha Software).

  • Use For HTML Reports

    Offload HTML reports to the report server. This option should be used under conditions where your HTML reports are very large or complex.

Web-socket Applications

Excel Files

  • Extension

    The default file extension to use for generated Excel files. This option can be used to force all files to use the .xlsx extension. This property can be set to the following:

    Extension
    Description
    .xls

    Default extension used. File extension used for Excel files created using versions of Office prior to 2007.

    .xlsx

    File extension used for Excel files created using Office 2007 and newer.

Design-time Properties

Web Project Properties Design-time Properties tab
Web Project Properties Design-time Properties tab

Automatic Backups

  • Backup folder

    When you edit your Components an automatic backup is created. If you leave this property blank, the backups are stored in a subfolder in your web project. You can specify a folder where you would like the backups to be stored.

  • Delete old backups

    If enabled, allows you to configure when backup files should be cleaned up.

    When you edit a component (i.e. Grid, UX, etc.) a backup copy is automatically made. The folder where the backups are stored can become quite large over time. You can specify that backups more than a certain number of days old should be purged. When purging old backups you can also specify the maximum number of backups to retain and the minimum number of backups to retain.

  • Number of days

    The number of days to keep a backup. If the backup is older than the specified number of days, it will be automatically deleted unless the number of existing backups is less than the specified Minimum number of backups. Leave this value blank to keep all backups.

    This property is only available when Delete old backups has been enabled.

  • Maximum number of backups

    The maximum number of backup files to keep. Leave blank to specify no limit.

    This property is only available when Delete old backups has been enabled.

  • Minimum number of backups

    The minimum number of backups to retain. When deleting old backup files, you can use this property to guarantee that a number of backups are retained. Leave blank to set the minimum to 1.

    This property is only available when Delete old backups has been enabled.

Create AEX for Live Preview

  • Auto-create AEX for Live Preview

    When doing a Live Preview from a component builder, should all functions and classes defined in the Code tab of the Control Panel be compiled into an AEX file and automatically be published to the LivePreview folder? If you components do not reference any global UDFs, then this property can be turned off.

Live Preview

  • Prompt to start server for Live Preview

    When you select Live Preview while working in a Component Builder, if the server is not started, Alpha Anywhere will prompt if you want to start the server. In some cases you might have a server started in another Alpha Anywhere instance, so it would not be necessary to start the server in the current Alpha Anywhere instance. If you check this property, the prompt to start the server will be suppressed.

A5_Application.A5I File

  • Encrypt connection strings

    Specify if connection strings in the a5_application.a5i file should be encrypted. Encryption is recommended. Turn encryption off if you are trying to debug a connection problem and want to see what connection strings are getting published.

Encrypt Published Components

  • Encrypted published components

    Alpha Anywhere can encrypt select file types when they are published. This allows developers who deploy application at on-site client locations to protect their work.

    If enabled, the following files will be encrypted when published. Note that component files must be saved using the Formatted JSON file format:

    • UX Components
    • Tabbed UI Components
    • Page Builder Components
    • Xbasic Function Library and Module files

    File types that are not encrypted include Grid Components, CSS files, JavaScript files, images, .a5w pages, and other static resources.

Component File Save Format

  • Default save component format

    The default file format used when saving components. Components can be saved using a binary file format or JSON. Binary creates smaller files. JSON saves components in clear text, making it a good fit for use with source control.

    Leave blank to use the default format set in the component builder for each component.

Publish Complete Message

Live Preview Machine Name

  • Machine name for Live Preview

    The default URL for the generated URL when performing a Live Preview or Live Test (using the Classic Server or Development Server). If you prefer to use localhost, or you are developing an application that uses a web service that requires the use of localhost or 127.0.0.1 for testing the API (e.g. Google Maps API, Web2Cal, etc), change the Machine name for Live Preview to the desired name.

Publish-time Warnings

  • Suppress connection string warnings

    A warning is shown during publish if your application includes connection strings that have not been configured in the publish properties. Checking Suppress connection string warnings turns off the warning.

  • Suppress no users defined warnings

    A warning is shown when publishing the seed users and groups for your application and no seed users are defined. Checking Suppress no users defined warnings turns off the warning.

See Also