How Can We Help?

Creating Events and Actions Using the Virtual Machine Editor

You are here:
< Back

There are times when it will be desirable to import data from existing databases or files to populate the new database created with the new application. Text-to-Software allows for data import and mapping the fields in a new application against existing data sources, whether they be files or databases. This is done using the Business Intelligence tab.

NOTE! Create new data links for each set of data being imported. This will prevent confusion when importing data from multiple sources and mapping them to different parts of the new application.

Importing data from external sources into an application built using Text-to-Software using Business Intelligence Tab

On the left-hand side of the screen is where the data import process is defined.
• First, select whether the data source is from a client server (SageTea Browser) or a database server.
• Second, name the data link by clicking the Add button. A prompt will appear requesting a name for the data link. This should be a relevant and memorable name that will help identify what the current link is.

Defining the Connection Type

Select the connection type from the dropdown list – this will be based on the type of database or file that currently contains the existing data to be imported. Text-to-Software connections refer to using one of Text-to-Software’s drivers for connecting. They are:

• SAGETEAMSAccessConnection
• MySQLConnection
• ODBCConnection
• ODBCThreadedConnection
• PostgresSQLEXDIConnection
• SAGETEAFileReader
• SAGETEACOMExcelController

Once a type of connection has been selected, options to either connect to a file or to a database will be provided.

Database Connections

Select the type of database from the drop-down list. If applicable, enter the username and password for that database.

File Connections

Click on Select and find the relevant data file in your computer’s hard drive.
Define Field and Record delimiters. These are the characters that separate each piece of data and the end of line. For Field, the options are: tab, colon, comma or space. For Record they are: CR, period, LF and comma. These can be selected from the drop-down lists.
Select how many header rows are in the file and check Values are in quotes, if applicable.
Selecting the Group for the New Application
Select the target Group in the Group drop down box. The data elements in the new application will then become displayed in the large box on the lower right. The State and Activity fields will auto fill once the Group is selected.

Mapping existing data to the data fields of the Text-to-Software-developed application

Map the data from the external source to the data fields on the right. You can use Add All or highlight each line and copy corresponding columns over using the > icon.

Importing the Data

A test of the mapping can be done first by clicking on Test Import. Adjustments can then be made before the final import is done.
Click on Import Data and Text-to-Software will import the data from the data source and display it in the large text box.

Additional Features

• Check Import new, Update existing and Import relations to further refine your data import specifications.
• Check Use data link for live import to have the application continuously pull data from a database at the interval set using Monitoring Intervals.
• Use Where to set additional conditions for importing. It provides an additional filter: i.e. pull all the items that have the word “January”.
• Format allows for additional text to be inserted along with the data that’s imported. Type the text into the Format box.

NOTE! Only data that is mapped will be imported. This process is just like creating a Smart Part. Once completed, click on Apply changes to save to the application. Nothing will appear in the Requirements tab that indicates this. To refer back, click on the Business Intelligence tab.
Defining events and actions using business logic, using the Virtual Machine Editor and the Text-to-Software Editor

This is an advanced Text-to-Software feature that requires some knowledge of coding and development. As such, the training will not go into details related to logic, but will orient participants to the Virtual Machine Editor, with the assumption that they have a basic understanding of programming logic.

Working in Controller States

The controllers of an application are the engines that do the work behind the scenes. For example, the user interface states (screens) display the graphical elements of your application, and the controllers do the work behind the scenes.

• Controllers make things happen when:
• The user presses a button
• A timer is up
• A variable equals something
• Any other number of events occur

Switching between user interface, client controller, server controller, and web server controller states can be done easily in Text-to-Software from the Tools menu. Different states will be displayed when in each of these views. When in user interface states, the screens of the application will be displayed. That is the view has been used throughout this training.

Use the Tools menu to assist in setting controllers.
Once in the appropriate state view, you work with it using the right-click commands below.

Transitions between controller states (client, server, and web controller) tell the application when to move from one state to another. Transition events and actions between controller states can be defined from the Requirements Tab, or using the Virtual Machine Editor.

The Virtual Machine Editor displays a visual representation of an application’s controller states. States display as boxes, and transitions display as arrows that connect the boxes. The Virtual Machine Editor provides the ability to draw arrows between boxes to add and edit transitions.

Previous Creating Components Using Text-to-Software
Next Creating Rules with Text-to-Software
Table of Contents