|
|
Pocket PC Creations Skills - Page 7
Pocket PC Creations Skills - Data
| 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, MySQL, FileMaker) via ADO (more practical than previous ODBC
systems) and Data Script.
There are data formats and
management facilities for many applications, 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 sessions/data automatically processed as soon
as they arrive from a Pocket PC, rather than processing them manually
from the Data Window (see below); 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 (see below) for 'manual' management of data.
The data pathway for a project configures the sequence of events
that occur each time a new set of data arrives from a Pocket PC,
either via an ActiveSync based synchronisation or via a wireless or
other 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 sessions 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 select a specific output target for data, say
HTML, a new
dialog will appear requesting additional information specific to that
target.
|
|
|
Data Script
- for Programmers
Data Script is an advanced function which allows session
flow events to be managed by segments of VBScript to fully automate data
processing from and to the Pocket PC client, and to execute additional
processes such as emailing data received from a Pocket PC. The default
script is shown in the Data Script window. (Please refer to technical
information on Automation and Data
Script if programming is required, eg to update specific fields in
a database, to send emails.)

Data scripting is beyond
the scope of this tutorial.
|
|
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.
Sessions 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 Courier example project shown
below).

The Data Window displays the data accumulated
from all project sessions chronologically. The way session data display on the
screen and 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.
Duplicate makes a copy of the selected session which is
identical but is a unique session with its own GUID (globally
unique identifier used for tracking purposes).
To select multiple session data,
click and drag the mouse over the session 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 (page 5) or via
TCP/IP, including wirelessly
(page 6), and Data Processing Pathway.
Marked sessions are identified for synchronise
via TCP/IP when a wireless client with corresponding unit ID connects to
the Pocket PC Creations server (page 6).
Practice the options for management of
data from the Data Window, as it is an important epicentre for
Pocket PC Creations operations. The
Data Window can be used for interim management of up to 1000 sessions,
though there is no enforced limit. The Data Window is normally used in
conjunction with Outgoing and Incoming session data management, that is,
not the sole data management area.
Note: Data Window sessions must
be set out in the default 'Oldest First' order for correct
numeric identification of a selection of sessions to be Exported from
the Data Window.
|
|
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 data to Excel, follow these
steps:
- To export a limited set
of session data, select them in the Results window. To export all
data,
there will be an option
later in the process.
- Choose the Export To... Excel...
option from the Data menu or use right mouse click
Export To...Excel.
- Select the desired export settings
in the dialog box, as shown below, and click OK...
- Choose a filename for the Excel
workbook, orientation of results, and display by either point ID
names or point captions 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 results shown below). This process
can be automated via the Data 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.
Note, Excel has a limit of 255
Columns of data, thus this is the limit for exporting sessions in
Horizontal orientation; if exporting more than 255 sessions to Excel,
select Vertical orientation as there is no limit on the number of Rows
in Excel. |
|
Data - HTML
Output
HTML, the format for web pages,
is probably the most universal medium used on computers. Results
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 from the Data Window 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
sessions,
or for the entire Data Window each time new sessions are added; this is
set up via the Outgoing tab functions.
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 data set passing through. It is useful therefore to
include variable 'placeholders' in the filename that will evaluate to a
unique name for each data set. 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: %NameDriver% %Road% %.date%.htm delivers
Jim Hall Coast Hwy 2010-03-21.htm

By default, HTML output will be formatted with a generic template,
displaying data 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 supports 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 data being processed.
Using HTML templates, fully formatted reports for printing 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), a Sales
Force order and an example government
form accepting output from Pocket PC Creations. The Sales Force HTML
template is included with 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
Outgoing (output/export) XML (Extensible Markup Language) is a simple, platform independent
method of storing structured information in text-based files. Pocket PC
Creations can export data 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
dynamically evaluated for each session passing through. It is necessary therefore to
include variable placeholders in the filename that will evaluate to a
unique name for each session or data set. 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.
Folder: C:\Breathalyser
Filename: %NameDriver% %Road% %.date%.xml delivers
Jim Hall Coast Hwy 2010-03-21.xml
or
Folder: C:\NewOrders
Filename: %Customer% %.guid%.xml may deliver
Ajax Printing 3D003828-980A-4E70-845A-31DAC4011BD0.xml
this is the same GUID/UUID found in the originating unique session in Pocket PC Creations.

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 sessions to a database (SQL Server, Access,
Oracle, SAP, 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:
- 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.
- Choose the Export To option from the Data menu, and
then choose Database...
- Select a complete or selective export, and click OK.
- Type an ADO connection string for the database you wish to use, or
alternatively, open a Microsoft Access .mdb database file. or .accdb database
file.
- 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.
If required, the _UnitID field in Pocket
PC Creations won’t normally ‘Guess Map’ to a SQL table field of UnitID,
but if after Guess Mapping other fields the _UnitID and UnitID are
manually selected and mapped, thereafter all should operate/populate
properly. Pocket PC Creations
ADO output processes images,
video and audio as Long Binary Data, so it can be universally and
efficiently placed in
the fields of Access, SQL Server, Oracle, SAP, MySQL and all other major
databases. Please see article re
Access
and OLE object fields,
where useful
Ammara DBPix software is
provided to display images stored as Long Binary Data without use of scripting.
Test out 'real time' publishing of data
from your Pocket PC via Pocket PC Creations wireless and ADO to SQL
Server and the WWW using the
Location Report
demonstration project. |
|
|
Data - XML
Incoming (input/import)
A second tab in the Data Pathway
dialog box, Incoming supports automatic processing of 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 data to and accepts data from Pocket PCs. The 'Enable Wireless' Option
(default) in Project Properties should be
checked for receipt of XML input.
To enable the Incoming 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.

Settings for Smartphone clients to
receive sessions from Pocket PC Creations server, eg via a 3G or GPRS mobile
phone network; when clients are not connected the sessions will be
stored and marked for dispatch when a connection is made by the client
Databases (eg Access) will
usually require 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. To ensure
incoming sessions are unique, the Incoming XML must include a Universal
Unique Identifier such
as when a session is first created in Pocket PC Creations (eg
<PPCC
UUID="DC02C801-A461-45E4-A93A-05777310AC15">).
If the PPCC UUID is omitted from XML, then Pocket PC Creations will generate a UUID.
Once incoming sessions have been
parsed, they can either be (1) stored or queued in the internal Data Window as 'Marked
for Send' (see above) for automatic dispatch when wireless client Pocket PCs log
in or Synchronise from the Pocket PC via a TCP/IP network, or (2) be automatically or manually dispatched
(see below) to one or
more Pocket PCs via the wireless TCP/IP network, or (3) be manually sent from the
Data Window to a
connected Pocket PC via ActiveSync.

Settings for Pocket PC Creations
server to send sessions directly to Pocket PC clients, eg via a 'WiFi'
WLAN within a hospital, factory or warehouse where clients are generally always
connected
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 Incoming session
options require MSXML, which can be obtained from Microsoft and is a component of later versions 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. |
|