Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a running total from LOVs

Status
Not open for further replies.

topnotchguy

Technical User
Jan 14, 2004
10
0
0
US
I'm a beginner forms programmer so this will sound like a really simple question. I have a list of items that I want the user to select from on the screen. Each item is an LOV which has an associated price attached to each item.

I want them to be able to go to each LOV, select the item, and then be able to look at a display item somewhere else on the screen to see a running total as they navigate to each item.

The running total is not a database item.

Do I need to create a display item and set the calculation mode, summarized block, summarized item, and smmary formula and place this item in the same block as the LOVs or will I have to create a trigger and writ the code mself in some manner?

Raf
 
Hi,

I actually already reviewed that thread before I asked my question. I am using Oracle 9i Forms Builder. The solution in that thread I believe is for someone writing PL/SQL code directly to a database using SQL+ or something similar.

What I'm trying to do is use the form builder to create a web interface that the user uses to interface to a database. The user is shown a list of text box items on the webpage. The user can then click on any of the items to retrieve a drop down list of items to choose from (LOV box appears). As he selectes each item to purchase, I wanted to be able to show the user a running total in another text item box. There are about 20 items on the screen that the user can navigate to and make a selection.

This suggests that I must create a WHEN-NEW-ITEM-INSTANCE trigger for each item so that when the person clicks on the item to get the drop down list, the tigger code can update a global variable that is read by the subtotal item.

Now, I can just have a button that the user can click on that will compute the total of everything he has selected so far on the screen. In that case, I can probably use the procedure that you or someone else suggested and put that procedure in a WHEN-BUTTON-PRESSED trigger but I was hoping for a more elegant solution :)

Does that clear up my question a little or did I just make it worst?
 
Ooos! I just realized that I'm asking this question in the wrong forum. I thought this was the Oracle 9i forms developer forum but I found the right forum for this question so I re-asked the question there.

If anyone knows the answer however, please feel free to respond as I will check both forums just in case.

Raf
 
Wow, after some diligent work this weekend, I figured this out myself. It was not as complicated as imagined. If anyone s interested in the solution I came up with, just let me know.

Raf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top