Pocket PC Creations Skills - Page 5

Data

Data in Pocket PC Creations  

Pocket PC Creations supports a full range of data management functions, for the individual, through to the largest of enterprises. For individuals and small businesses, simple and efficient export to HTML (web page format) and Excel may suffice (therefore don't be deterred by some of the more complex systems below, they are applicable to large enterprises).

The information collected in a project session with Pocket PC Creations on a Pocket PC can be viewed in Pocket PC Creations, exported as HTML, XML and to Excel,  and exported to database systems (eg Access, SQL Server, Oracle, dBase, FileMaker) via ADO (more practical than previous ODBC systems) and Data Script.

There are data formats and management facilities for all situations, accessed from the Data menu:

Formats - such as for a useful spreadsheet in Excel or receipt of information wirelessly into an enterprise database server using XML, the latest media; and

Management - manually moved through data management stages or automatically processed through to files for storage or participation in other programs in 'real time'.


Data Pathway

This is the control centre for the management of data collected from a Pocket PC (or many Pocket PCs), and other information handling functions.

View and edit the data pathway for a project by choosing Data Options... from the Data menu. The dialog that appears allows choice of the "Outgoing" output targets to which new data are exported automatically, and an advanced "Incoming" pathway to load XML input into sessions for dispatch to Pocket PCs.

Often it is desirable to have results automatically processed as soon as they arrive from a Pocket PC, rather than processing them manually from the results window; for example, marketing information being received wirelessly from sales representatives in the field. To enable this, Pocket PC Creations supports a configurable Data Pathway which complements a Data Window for 'manual' management of results..

The data pathway for a project configures the sequence of events that occur each time a new set of data arrive from a Pocket PC, either via an ActiveSync based synchronisation or via a TCP/IP connection.

For each individual Outgoing data set, there is the option of exporting to any combination of HTML, XML and ADO. Additionally, data can be stored in the Pocket PC Creations Data Window, which is the default behaviour for a project.

If Data are stored in the internal Data Window, there is the option of exporting the entire accumulated data to Microsoft Excel and/or a HTML page. XML and ADO output targets are not applicable in this case, they are managed from the Data Options menu with the facility to automatically move individual data sets through to target files and programs.

When clicking to enable a specific output target for data, a new dialog will appear requesting additional information specific to that target.

Data Script is an advanced function which allows session flow events to be managed by segments of VBScript. The default script is shown in the Data Scripting window. (Please refer to Technical Comments on Automation and Data Scripts if programming is required, eg to update specific fields in a database.)


Data - Data Window - Viewing the Data

Following synchronisation between a project on a Pocket PC and a desktop PC, project sessions data may be stored on the desktop PC in the Data Window and be accessible via the Data icon. Data can also be loaded into the Data Window via New Session run on the desktop PC and sent to Pocket PCs in the field. The Data Window is an important facility for gathering and dispatching information, both text and images.

Double click the Data icon in the project window to open the Data Window (view of Breathalyser shown below).

The Data Window displays the data accumulated from all project sessions chronologically.  The way sessions display chronologically can be modified using options on the Data Menu (right mouse click).

Session data sets can be selected and deleted; simply click the top of a Data column followed by Delete on the Edit menu, a query will be posed to confirm deletion. Deleted data cannot be recovered on the desktop PC, and will not be available on the Pocket PC either. The Delete function is essential for data files management, but generally should be exercised only after Export of data to Excel, HTML, XML or a database.

To select multiple data sessions, click and drag the mouse over the data columns or rows.

Right click the mouse once data are selected and chose options for management of the content, including Export To Excel, HTML, XML and databases, and Send To Pocket PCs, either locally connected by ActiveSync or wirelessly (per page 4).

Practice the options for management of data from the Data Window, as it is an important epicentre for Pocket PC Creations operations.


Data - Data Window - Exporting to Microsoft Excel

If you have Microsoft Excel installed on your PC, you can export project data to an Excel workbook for further analysis or reporting.

To export project results to Excel, follow these steps:

  1. To export a limited set of session data, select them in the Data Window. To  export all data, there will be an option later in the process.
  2. Choose the Export To...Excel... option from the Data menu or use right mouse click Export To...Excel.
  3. Select the desired export settings in the dialog box, as shown below, and click OK...
  4. Choose a filename for the Excel workbook and orientation of data and click OK...

Pocket PC Creations will create an Excel workbook with a spreadsheet representation of all or selected stored data, similar to the view in the Data Window itself (partial view of Breathalyser data shown below). This process can be automated via the Results Pathway, sending the entire contents of the Data Window to an Excel spreadsheet. Data from sessions can be taken back into the field with Pocket Excel for reference.


Data - HTML Output

HTML, the format for web pages, is probably the most universal medium used on computers.  Data files exported to HTML can readily be viewed in the common web browsers, Internet Explorer and Netscape. 

Basic: To set up convenient HTML storage, follow the same approach described above for export to Excel, but chose the HTML option and a convenient file name, eg breathalyser.htm.

Advanced: An advanced automated HTML output can be performed either for individual session data, or for the entire Data Window each time new sessions are added. 

To set up an HTML Output system for individual sessions, a target folder and filename must be selected. Although the target folder is static, the filename will be evaluated for each session passing through. It is useful therefore to include variable 'placeholders' in the filename that will evaluate to a unique name for each session. The available variables are:

  • %pointIDname% - data from the session, associated with a point
  • %.guid% - a globally unique identifier used for tracking purposes.
  • %.time% - the time (HH-MM) the data was saved.
  • %.date% - the date (YYYY-MM-DD) the data was saved.
  • %.unitID% - the Unit ID of the origin Pocket PC/device.

While to some extent these are advanced features, they can be very useful for everyday use for naming systems for files associated with a session..

For example:
Folder: C:\Breathalyser
Filename: %date%%Road%.htm delivers 2002-4-21Coast Hwy.htm

By default, HTML output will be formatted with a generic template, displaying results either horizontally or vertically. In many cases it is desirable to produce a more user friendly document, tailored to the specific project's application. Pocket PC Creations allows designation of a custom template with which to output HTML files.

A HTML template suitable for use with Pocket PC Creations is a standard HTML file, with one important exception:

- whenever Pocket PC Creations detects a tag of the form <% NameOfPoint %>, it will replace the entire tag with the value of the named point (which in this case point ID Name was NameOfPoint), taken from the results being processed.

Using this method, fully formatted reports can be generated automatically by Pocket PC Creations using a custom template designed for the project. Click to see an example HTML output, the HTML template used (and View Source), and an example government form accepting output from Pocket PC Creations.

HTML files can be opened in a web browser and printed, it's also a convenient format to publish tabulated results either on the Internet or an Intranet, or to attach to or insert into an email for dispatch to others (partial view of Breathalyser data shown below). 


Data - XML Output

XML (Extensible Markup Language) is a simple, platform independent method of storing structured information in text-based files. Pocket PC Creations can export results in the XML format to aid integration with other XML enabled software. This is particularly useful where different software programs may otherwise be a barrier to movement of data.

To set up an XML Output system, a target folder and filename must be selected. Although the target folder is static, the filename will be evaluated for each result passing through. It is useful therefore to include variable placeholders in the filename that will evaluate to a unique name for each result. The available variables are: 

  • %pointIDname% - data from the session, associated with a point
  • %.guid% - a globally unique identifier used for tracking purposes.
  • %.time% - the time (HH-MM) the data was saved.
  • %.date% - the date (YYYY-MM-DD) the result was saved.
  • %.unitID% - the Unit ID of the origin Pocket PC/device.

For example:
Folder: C:\IncomingOrders
Filename: %.guid%.xml

Pocket PC Creations has two XML output modes: page grouped and ungrouped (discrete). In page grouped mode, the points on each page are grouped into a tag:

<NameOfPage>
  <FirstPoint>Data</FirstPoint>
  <SecondPoint>Data</SecondPoint>
</NameOfPage>
<AnotherPage>
  <ThirdPoint>Data</ThirdPoint>
</AnotherPage>

In ungrouped mode, each point exists under the root level, and pages are ignored:

<FirstPoint>Data</FirstPoint>
<SecondPoint>Data</SecondPoint>
<ThirdPoint>Data</ThirdPoint>

In some cases it is helpful to have a schema document for all XML output generated by a particular project. A schema defines the format and acceptable content of an XML document. Pocket PC Creations has the capability to generate a schema for a project from within the configuration dialog, the schemas supported by available servers includes Microsoft BizTalk Server.


Data - ADO output to Databases

Pocket PC Creations can output results to a database (SQL, Access, Oracle, Foxpro, dBASE, FileMaker and others), provided it is accessible via an ADO (Active X Data Object) driver. ADO is more practical then the out-dated ODBC system for database connectivity.

To export data to a database:

  1. To export a limited set of data, select data in the Data Window. To export all data, this will be an option later in the process.
  2. Choose the Export To option from the Data menu, and then choose Database...
  3. Select a complete or selective export, and click OK.
  4. Type an ADO connection string for the database you wish to use, or alternatively, open a Microsoft Access .mdb file.
  5. Select the table and fields to populate with Pocket PC Creations data, and click OK.

Note that this process may vary slightly depending on the nature of the database exporting to. There may be prompts for additional information necessary to access and modify the database.

After the successful selection of a data source, the field mapping dialog will appear. If the data source needs to be reconfigured at any time, it can be modified via the Database button, see below.

In some databases, a list of available tables will appear in the Table Name selection. Select the table to store results in, or enter the name of the table manually if need be.

Once a valid table name has been entered, a list of fields in the table will appear in the right-most list under Table Fields. To the left under Project Fields is a list of points in the project that can contain data. To create a mapping between a Pocket PC Creations point and a field in the table, first select the point from the left list. The previous mapping, if any, will be selected in the right list. Click on a new field in the right list to change the mapping.

Note the Guess Mapping button can be used to attempt to automatically create a mapping between the project and the fields in the table, by matching point names with field names. It will report which points were mapped successfully.


Data - XML Input

A second tab in the Data Pathway dialog box, Incoming supports automatic processing for sessions received from other applications in the XML format. Using this method, Pocket PC Creations can be fully integrated into a larger solution that both provides and accepts data for use on mobile devices. The "Enable Wireless" Option in Project Properties should be checked for receipt of XML input.

To enable the XML Session Input system, a source folder and filespec need to be specified. The source folder is where the Pocket PC Creations server will look for new XML documents. The filespec, which by default is *.xml, specifies the type of file to look for. When Pocket PC Creations finds a file in the source folder that matches the filespec, it will parse it.

Databases (eg Access) will usually require a a target XML schema in the folder to which XML is being sent and checked by Pocket PC Creations every 10 seconds for Incoming XML. An appropriate XML schema is simply an XML file generated by Pocket PC Creations via Outgoing XML for the same project.

Once incoming sessions have been parsed, they can either be stored in the internal Data Window as 'Marked for Send' for automatic dispatch when wireless client Pocket PCs log in or synchronise from the Pocket PC, or be automatically or manually dispatched to one or more Pocket PCs via the wireless network, or be manually sent from the Data Window to a connected Pocket PC via ActiveSync.

Where a specific target Unit ID needs to be specified, for example where an incoming session is to be dispatched to a specific Pocket PC, an extra element can be included in the XML document: <UnitID>my_unit_id</UnitID> . This will be included if an Outgoing XML file for the same project is used as the target XML schema.

In general, for most wireless operations controlled from the client Pocket PC via either 'Synchronise' or 'Send Now', the settings should be as for the first Incoming XML set up shown above, ie 'Store incoming sessions in the internal Data Window' plus 'Mark new sessions as queued for subsequent dispatch'.

Note that once an incoming session has been successfully processed, the source file will be removed from the file system. If an error occurs and the session cannot be processed, or cannot be dispatched to the appropriate Pocket PC, the source file will remain either until the problem is corrected, or failing that, indefinitely.

Note: The XML Session Input options require MSXML, which can be obtained from Microsoft Corporation and is a component of the latest version of Internet Explorer. If problems are experienced using these features, download and install the MSXML components.


Well done, you have completed the Pocket PC Creations Skills tutorial. We invite you to try out the Assessment for Certification.


Previous Page 1 - 2 - 3 - 4 - 5 - End Finish