Home > Archive > dBASE Web Applications > April 2005 > Item selection









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Item selection
Dan Anderson

2005-04-04, 8:03 pm

db+ I am building an internet application for retail insurance agents to
use to get quotes for their clients. I have the intital portion done where
they enter a minimal amount of information necessary to underwrite a quote.
Now, I want these retail agents to be able to come back and (1) check the
processing status of each of their submissions and (2) go back update the
information they have already entered or fill in fields previously left
blank to prepare their submission for binding. How can I present each agent
(based on their signin info) with only their submissions? Ideally, I'd like
it to appear as if it were in a grid or a dropdown menu. The data file name
is Quotes.dbf and the relevant fields are UserID (name of the agent),
Quotenum (quote number) and IName (name of the insured). Is there an
example of something like this anywhere I can look it over?

--
Dan Anderson
UBI Special Projects Dept.
andersond@ubinc.com
800-444-4824 ext 128
--


Michael Nuwer [dBVIPS]

2005-04-04, 8:03 pm

Dan Anderson wrote:
> db+ I am building an internet application for retail insurance agents to
> use to get quotes for their clients. I have the intital portion done where
> they enter a minimal amount of information necessary to underwrite a quote.
> Now, I want these retail agents to be able to come back and (1) check the
> processing status of each of their submissions and (2) go back update the
> information they have already entered or fill in fields previously left
> blank to prepare their submission for binding. How can I present each agent
> (based on their signin info) with only their submissions?


Before streaming the response page to your user, filter the table by the
userID. Then only the one user's records will be streamed.


> Ideally, I'd like
> it to appear as if it were in a grid or a dropdown menu.


I use an HTML table to simulate the appearance of the grid. I also add
buttons (edit, delete, etc), one for each row in the grid. The user can
then choose the row they wish to act upon.

> The data file name
> is Quotes.dbf and the relevant fields are UserID (name of the agent),
> Quotenum (quote number) and IName (name of the insured). Is there an
> example of something like this anywhere I can look it over?
>


Although not exactly what you're looking for, the following my give some
ideas:

http://137.143.105.61/WebStore/webstore.exe

http://137.143.107.70/bugtrack/
Dan Anderson

2005-04-04, 8:03 pm

Michael, you clearly understand what I am looking for. I, however, am not
clear how to "stream" the information into a response page or how to put it
into a table without knowing how many items will be present. In most cases
then number of submissions in limbo will be 2-5 since our turn and is no
more than a few hours. It takes the agent much longer to finalize the
process by completing the application. But when I try to picture just how
to do this I go blank.


--
Dan Anderson
UBI Processing Dept.
andersond@ubinc.com
800-444-4824 ext 101
"Michael Nuwer [dBVIPS]" <none@no.place.it> wrote in message
news:zG6JKDKKFHA.296@news-server...
> Dan Anderson wrote:
>
> Before streaming the response page to your user, filter the table by the
> userID. Then only the one user's records will be streamed.
>
>
>
> I use an HTML table to simulate the appearance of the grid. I also add
> buttons (edit, delete, etc), one for each row in the grid. The user can
> then choose the row they wish to act upon.
>
>
> Although not exactly what you're looking for, the following my give some
> ideas:
>
> http://137.143.105.61/WebStore/webstore.exe
>
> http://137.143.107.70/bugtrack/



Michael Nuwer [dBVIPS]

2005-04-04, 8:03 pm

Dan Anderson wrote:
> Michael, you clearly understand what I am looking for. I, however, am not
> clear how to "stream" the information into a response page


Have you read any of the documents on creating web applications? For
the most part this functionality is built into the dBASE Web classes.
Generally it's similar to writing strings to a text file.

http://www.dbase.com/Knowledgebase/...ADB2KWEBAPP.HTM
http://www.nuwermj.potsdam.edu/dBulletin/bu19_b.htm

http://www.nuwermj.potsdam.edu/dBulletin/bu10_d.htm
http://www.nuwermj.potsdam.edu/dLearn/web/index.html


> or how to put it
> into a table without knowing how many items will be present.


In the web app one would loop through a filtered DBF table; read each
record; format it as string embedded with HTML table tags; "stream" or
send the string to the web browser.

http://www.nuwermj.potsdam.edu/dLearn/web/Session05.htm
http://www.nuwermj.potsdam.edu/dLearn/web/Session07.htm
http://www.nuwermj.potsdam.edu/dBulletin/bu18_e.htm

> In most cases
> then number of submissions in limbo will be 2-5 since our turn and is no
> more than a few hours. It takes the agent much longer to finalize the
> process by completing the application. But when I try to picture just how
> to do this I go blank.


I don't I'm following you. Are you saying that a user submits temporary
data (or work in progress)? And you want store or hold that data for a
sort time while offering the user the ability to modify the submitted data?

--
Michael Nuwer
http://www.nuwermj.potsdam.edu/dLearn/
Dan Anderson

2005-04-04, 8:03 pm

Actually, I've written this entire application as a combination of .htm
pages and dBase executables (WebClass.cc). But I've never needed to stream
anything. We are an insurance broker (wholesaler) and our actualy clients
are retail insurance agents. They will have entered information in the
original application to submit for a quote. The part I am writing now will
allow them to come back to a secure area of our website and check the status
on each of these submissions. So I need to stream a list of their pending
submissions. The data list will already be filtered based on the
information they used to sign in. This is a quick and dirty application
that just lets them view the status of these records. Later I will need to
take this a step farther based on the very same logic. If their submission
is denied nothing more will be needed. However, if we extend a quote and
they choose to have it bound they will need to provide us with more detailed
information than was needed to make the quote. For example, this
application is only being used in our commercial trucking dept. So, in the
submission for a quote they would need to list the names of the drivers and
their dates of birth. If the submission is to be bound we will need the
driver's SSnum, CDL number and years experience driving commercially. So,
in the second application I must stream the list of quoted submission and
allow the user to select one to go work on. In either case I need to stream
a short list of submissions. Are there any article that deal with this type
of thing?



--
Dan Anderson
UBI Processing Dept.
andersond@ubinc.com
800-444-4824 ext 101
"Michael Nuwer [dBVIPS]" <nuwermj@nospam.please.yahoo.com> wrote in message
news:myRszphKFHA.152@news-server...
> Dan Anderson wrote:
>
> Have you read any of the documents on creating web applications? For the
> most part this functionality is built into the dBASE Web classes.
> Generally it's similar to writing strings to a text file.
>
> http://www.dbase.com/Knowledgebase/...ADB2KWEBAPP.HTM
> http://www.nuwermj.potsdam.edu/dBulletin/bu19_b.htm
>
> http://www.nuwermj.potsdam.edu/dBulletin/bu10_d.htm
> http://www.nuwermj.potsdam.edu/dLearn/web/index.html
>
>
>
> In the web app one would loop through a filtered DBF table; read each
> record; format it as string embedded with HTML table tags; "stream" or
> send the string to the web browser.
>
> http://www.nuwermj.potsdam.edu/dLearn/web/Session05.htm
> http://www.nuwermj.potsdam.edu/dLearn/web/Session07.htm
> http://www.nuwermj.potsdam.edu/dBulletin/bu18_e.htm
>
>
> I don't I'm following you. Are you saying that a user submits temporary
> data (or work in progress)? And you want store or hold that data for a
> sort time while offering the user the ability to modify the submitted
> data?
>
> --
> Michael Nuwer
> http://www.nuwermj.potsdam.edu/dLearn/



Michael Nuwer [dBVIPS]

2005-04-04, 8:03 pm

Dan Anderson wrote:
> Actually, I've written this entire application as a combination of .htm
> pages and dBase executables (WebClass.cc). But I've never needed to stream
> anything.


Not even a simple "thank you" page? Every request submitted to a web
server MUST be responded to with something. Perhaps you're steaming a
response without knowing it. Perhaps you're using one of the WebClasses'
build-in methods(?).

> We are an insurance broker (wholesaler) and our actualy clients
> are retail insurance agents. They will have entered information in the
> original application to submit for a quote. The part I am writing now will
> allow them to come back to a secure area of our website and check the status
> on each of these submissions. So I need to stream a list of their pending
> submissions. The data list will already be filtered based on the
> information they used to sign in. This is a quick and dirty application
> that just lets them view the status of these records. Later I will need to
> take this a step farther based on the very same logic. If their submission
> is denied nothing more will be needed. However, if we extend a quote and
> they choose to have it bound they will need to provide us with more detailed
> information than was needed to make the quote. For example, this
> application is only being used in our commercial trucking dept. So, in the
> submission for a quote they would need to list the names of the drivers and
> their dates of birth. If the submission is to be bound we will need the
> driver's SSnum, CDL number and years experience driving commercially. So,
> in the second application I must stream the list of quoted submission and
> allow the user to select one to go work on. In either case I need to stream
> a short list of submissions. Are there any article that deal with this type
> of thing?


Sounds to me like you are looking for "drill down" reports. (Remember
that web reports can be interactive, unlike desktop reports.) I do not
know of a particular paper on this subject. My web report wizard will
create a drill down report. The dBASE web wizards will also create a
drill down report.

My wizard is explained here:
http://www.nuwermj.potsdam.edu/dBulletin/bu18_e.htm

An example, with code is here:
http://www.nuwermj.potsdam.edu/dSam...eportsdemo.html

My page one might be similar to your login page.
The second page would be a status list for the particular agent.
In my demo app the third page is a detailed report of the selected item.
But this third page could be a data edit page based on the information
sent in the Hyperlink.

If you would like to use the dBASE report class and the dBASE web
wizards, I have discussed how to modify that system to work with drill
downs and data editing in this paper:
http://www.nuwermj.potsdam.edu/dBulletin/bu15_e.htm

(but, between you and me, I advise that one keeps clear of dBASE reports
on the web. I believe its better to make your own reports -- you have
much, much more control over the output.)

Claus Mygind

2005-04-04, 8:03 pm

Dan,
I agree with my tutor Michael, stay clear of the dBASE reports. With Mike's
help I have written a couple applictions with the exact same functionally as
you are spec out here.

Since you have already written most of this application, you obviously do
not need detailed instructions on how to do this. So what specific
questions do you have in streaming out a table of limited records with
unique links to pull up detail screen of each of those records?

Limiting the records you want to stream out can eaily be limited with good
indexes. For example to show the retail insurance agent what records he/she
has entered add a tracking field to your table Quotes.dbf . Then index on
UserId+trackField. If you only want to display records not processed scope
the index with "for empty(trackField)". Create a second similar index and
scope it with "for not empty(trackField)" to show which records have been
submitted by the agent.

Then use the "<oRef>.setRange(<startKey exp> | null, <endKey exp> | null )"
to limit the records that will stream out when you step through the file.

db = new DATABASE()
db.databaseName = "<your database name>"
db.active = true
q = new QUERY()
q.database = db
q.sql = "select * from quotes.dbf"
q.active = true

//Here you set the order of the records by userId and depending if
you are using one of the scoped indexes only records that have or have not
been submitted will be streamed out.
q.rowset.indexname = "<the index your created above to include only
the records you want>"

//Create some variables that make it easier to reference the rowset
and fields.
local f, fr
f = q.rowset.fields
f = q.rowset

//Here you limit the records to only those that match the the userId
fr.setRange( cUserId )

//I always like to make sure I am at the first record of the rowset
fr.first()

//start your streaming process
oCGI.streamHeader("Records for:"+cUserId)
oCGI.streamBody()
oCGI.streamFooter()

//create your your class for streambody so you can customize how your
streamed output is displayed.

Class MyCGISession of CGISession from "WebClass.cc"

function streamBody

with (this.fOut)

puts([<BODY>])
puts([<FORM METHOD="POST" Action="" ])

//Stream out a table. If you want to see the table set the "border
= 1"
puts(' <table border="0" cellpadding="1" cellspacing="0"
width="95%">')


//Stream out the header row for your table so the columns make sense
to the user
puts([ <tr>])

puts([ <td>'\])
puts([ Quote #])
puts(' </td>')

puts([ <td>'\])
puts([ Insured's Name])
puts(' </td>')

puts([ </tr>])

//put a loop in your streaming output.
//Since the records are already in the
//order your want and the rowset is
//limited to just the records associated
//with this user remember "setRange" above
//all you need to do is step through each
//record until you get to the end.

//with the loop it does not matter if you
//have 2 or 200 records.

// alternate the background color for each line of detail records
//you stream out
cBackColor = "grey"

do while not fr.endofset
//start a new row for the table
puts(' <tr>')

//now stream out each cell you want to display on this row

//since the Quote Number is the unique identifier for the detail
record to display.
//stream it out with an anchor so the user can call up a detail
screen.
cValue = f["Quotenum"].value
puts([ <td bgcolor=]+cBackColor
+[ >])
puts([<a href="your receiving dBASE app.exe?]+cValue+
[">]+cValue+[</a>]
puts([</td>])

cValue = f["IName"].value
puts([ <td bgcolor=]+cBackColor
+[ >]+cValue+[</td>])

//close the row just streamed out
puts([ </tr>])

//change the back ground color for the next line
if cBackColor = "grey"
cBackColor = "white"
else
cBackColor="grey"
endif
//advance to the next record
fr.next()

enddo

puts([ </table>])
puts([</FORM])
puts("</BODY>")
endwith

endclass

This is a little sloppy, but it should get you started. Later on you will
probably want to put in Group and subGroup breaks with totals and the like
which is not to tough..


Dan Anderson

2005-04-04, 8:03 pm

Many thanks to both Claus and Michael. I believe you have provided exactly
what I needed.

--
Dan Anderson
UBI Processing Dept.
andersond@ubinc.com
800-444-4824 ext 101
"Claus Mygind" <cmygind@yahoo.com> wrote in message
news:c0jxx5bLFHA.1528@news-server...
> Dan,
> I agree with my tutor Michael, stay clear of the dBASE reports. With
> Mike's help I have written a couple applictions with the exact same
> functionally as you are spec out here.
>
> Since you have already written most of this application, you obviously do
> not need detailed instructions on how to do this. So what specific
> questions do you have in streaming out a table of limited records with
> unique links to pull up detail screen of each of those records?
>
> Limiting the records you want to stream out can eaily be limited with good
> indexes. For example to show the retail insurance agent what records
> he/she has entered add a tracking field to your table Quotes.dbf . Then
> index on UserId+trackField. If you only want to display records not
> processed scope the index with "for empty(trackField)". Create a second
> similar index and scope it with "for not empty(trackField)" to show which
> records have been submitted by the agent.
>
> Then use the "<oRef>.setRange(<startKey exp> | null, <endKey exp> |
> null )" to limit the records that will stream out when you step through
> the file.
>
> db = new DATABASE()
> db.databaseName = "<your database name>"
> db.active = true
> q = new QUERY()
> q.database = db
> q.sql = "select * from quotes.dbf"
> q.active = true
>
> //Here you set the order of the records by userId and depending if
> you are using one of the scoped indexes only records that have or have not
> been submitted will be streamed out.
> q.rowset.indexname = "<the index your created above to include only
> the records you want>"
>
> //Create some variables that make it easier to reference the rowset
> and fields.
> local f, fr
> f = q.rowset.fields
> f = q.rowset
>
> //Here you limit the records to only those that match the the userId
> fr.setRange( cUserId )
>
> //I always like to make sure I am at the first record of the rowset
> fr.first()
>
> //start your streaming process
> oCGI.streamHeader("Records for:"+cUserId)
> oCGI.streamBody()
> oCGI.streamFooter()
>
> //create your your class for streambody so you can customize how your
> streamed output is displayed.
>
> Class MyCGISession of CGISession from "WebClass.cc"
>
> function streamBody
>
> with (this.fOut)
>
> puts([<BODY>])
> puts([<FORM METHOD="POST" Action="" ])
>
> //Stream out a table. If you want to see the table set the "border
> = 1"
> puts(' <table border="0" cellpadding="1" cellspacing="0"
> width="95%">')
>
>
> //Stream out the header row for your table so the columns make
> sense to the user
> puts([ <tr>])
>
> puts([ <td>'\])
> puts([ Quote #])
> puts(' </td>')
>
> puts([ <td>'\])
> puts([ Insured's Name])
> puts(' </td>')
>
> puts([ </tr>])
>
> //put a loop in your streaming output.
> //Since the records are already in the
> //order your want and the rowset is
> //limited to just the records associated
> //with this user remember "setRange" above
> //all you need to do is step through each
> //record until you get to the end.
>
> //with the loop it does not matter if you
> //have 2 or 200 records.
>
> // alternate the background color for each line of detail records
> //you stream out
> cBackColor = "grey"
>
> do while not fr.endofset
> //start a new row for the table
> puts(' <tr>')
>
> //now stream out each cell you want to display on this row
>
> //since the Quote Number is the unique identifier for the detail
> record to display.
> //stream it out with an anchor so the user can call up a detail
> screen.
> cValue = f["Quotenum"].value
> puts([ <td bgcolor=]+cBackColor
+[ >])
> puts([<a href="your receiving dBASE app.exe?]+cValue+
> [">]+cValue+[</a>]
> puts([</td>])
>
> cValue = f["IName"].value
> puts([ <td bgcolor=]+cBackColor
+[ >]+cValue+[</td>])
>
> //close the row just streamed out
> puts([ </tr>])
>
> //change the back ground color for the next line
> if cBackColor = "grey"
> cBackColor = "white"
> else
> cBackColor="grey"
> endif
> //advance to the next record
> fr.next()
>
> enddo
>
> puts([ </table>])
> puts([</FORM])
> puts("</BODY>")
> endwith
>
> endclass
>
> This is a little sloppy, but it should get you started. Later on you will
> probably want to put in Group and subGroup breaks with totals and the like
> which is not to tough..
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com