Search PalmPower's 487 Palm-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Developing a Palm VII PQA that reads data from a Domino database (continued)

FIGURE B

The Customers PQA icon on the Palm VII.

Figure C shows the HTML form we designed in the code shown earlier in this article. Notice the Go submit button and the lines to the right of it. These lines indicate that tapping this button with the stylus will perform an "over the air" function and will require the user to raise the antenna on the Palm VII in order to complete the transaction.

FIGURE C

This is the Customers PQA asking for a customer name.

Figure D shows that I have requested the PQA to find all documents in the database that contain the word "Evergreen".

FIGURE D

Search for all Customer documents that contain the word "Evergreen".

Figure E shows the Web clipping generated by the LotusScript agent on the Domino server. Notice that there is a History button on the top right of Figure E. This button functions like the Address History in a Web browser. It stores past queries. Also notice the title "PalmBuilder" in the upper left corner. The LotusScript agent Web clipping generates both the History and the PalmBuilder elements.

FIGURE E

The Web clipping generated by the Domino server.

The Web clipping LotusScript agent
So far I have shown you the PQA itself and how to create one for the Customer Tracking database. Now let's take a look at the Domino side of the equation and more specifically the agent used to generate the Web clipping.

Here's the code that actually generates the Web clipping content.

Sub Initialize
'Dimension some Objects
Dim s As New NotesSession
'doc is the document posted by the PQA
'cdoc is the actual customer document in the database
Dim doc, cdoc As NotesDocument
Dim db As NotesDatabase
Dim c As NotesDocumentCollection
Dim dateTime As New NotesDateTime("12/01/80")
'Get a handle to the document posted to the Domino server
Set doc = s.DocumentContext
'Read the REQUEST_CONTENT CGI variable and get the Customer name entered on
the PQA
Customer$ = Mid$(doc.REQUEST_CONTENT(0),Instr(1,doc.REQUEST_CONTENT(0),"=")
+ 1, Len(doc.REQUEST_CONTENT(0)))
'Tell the Domino server not to generate a HEAD tag
Print "Content-Type:text/plain"
Print "Content-Type:text/html"
'Generate our own HEAD tag and generate web clipping Meta tags required by
the PQA
Print "<head><Title>PalmBuilder</Title>"
Print "<meta name=palmcomputingplatform content=true>"
Print "<meta name=historylisttext content=" & Ucase$(Customer$) & ">"
Print "</head>"
'Get a handle to the current database
Set db = s.currentdatabase
'Search the database for the Customer name entered. Results are placed in a
document collection
Set c = db.ftsearch(Customer$, 0)
'How many did we find?
Print "Found " & c.count & " matches for customer " & Ucase$(Customer$) &
"<p><hr>"
'Did we find any documents?
If c.count >= 1 Then
'Loop through each document in the collection
For i = 1 To c.count
'Get a handle to the document
Set cdoc = c.getnthdocument(i)
'Generate the company name
Print "<B>" & cdoc.CompanyName(0) & "</B><p>"
Print cdoc.FirstName(0) & " " & cdoc.LastName(0) & "<p>"
'If there is a Phone number then let them know
If cdoc.Phone(0) <> "" Then
Print "Phone: " & cdoc.Phone(0) & "<p>"
End If
'If there is a FAX number then let them know
If cdoc.FAX(0) <> "" Then
Print "FAX: " & cdoc.FAX(0) & "<p>"
End If
'If there is a Customer Type assigned then let them know
If cdoc.CustomerType(0) <> "" Then
Print "Customer Type: " & cdoc.CustomerType(0) & "<p>"
End If
'If there is a Customer Status assigned then let them know
If cdoc.Status(0) <> "" Then
Print "Status: " & cdoc.Status(0) & "<p>"
End If
'If there is a Sales Person assigned then let them know
If cdoc.SalesPerson(0) <> "" Then
Print "Sales Person: " & cdoc.SalesPerson(0) & "<p><hr>"
End If
Next i
Else
'Oh no - no customer matches!
Print "<p>No Customers were found for your query<p>"
End If
'Give the user a way to go back and query another customer
Print "<a href=""file:CustStudio.pqa/custstudio.html"">Back</a><p>"
End Sub

« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Wireless (97 articles)
   T-Mobile's home hotspot: what's hot and what's not
   The inside story of Sereniti, a new wireless router company
   Please stop clicking on the monkey: a Q&A on home networking security
Home > Phones and PDAs > Palm and Treo > Programming (24 articles)
   How PDA software is born
   Program with Simplicity
   Kinectivity 2.0 brings enterprise application developers new tools
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Other PalmPower Articles
Palm gets up to date with new Tungsten family of handhelds
Create handwritten email with riteMail
Presenter-to-Go puts PowerPoint presentations on your Palm OS handheld
Looking for the cutting edge
Gain remote access to databases and PLCs
PalmSource Open House showcases what's new in the Palm community
Analysis: handheld market share
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
DominoPower: Application development, William Shatner, and the origin of the universe
OutlookPower: More about disappearing text
-- Advertisement --

Write for Computing Unplugged!
Share your experience and expertise with other handheld device users. There are new opportunities at ZATZ for contributing authors and editors.

Write about something you're an expert on and get your name in lights.

For Writers' Guidelines and to discuss topics, contact Staff Editor Steve Niles. This is your opportunity to shine in front of your peers, your clients, and friends.

Click for more info!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login