Solved

Calculate Sum of Field and populate list error

Posted on 2004-03-22
2
746 Views
Last Modified: 2013-12-12
hi!
    I have a tabular foRm having a fields TASK, UPL_STT, SK, INVOICE_NUM and QTY..name of my block is UP_F.. I created LIST ITEMS named LB_STAT_LIST (to filter UPL_STT), LB_INV_LIST (to filter INVOICE_NUM) and LB_SKU_LIST (to filter SKU's only)...now what i want to do is i want to get the sum of QTY when I choose specific SKU IN LB_SKU_LIST...how will i do this in run time...i have checked the help and i can't get it...could you give me steps or example?

and another thing...

I am dynamically inserting values from the DB
into a Oracle forms list item.

Its working when the data type of the list item is set to char. But when I change it to a Date datatype or a Number datatype to suit the column fields accordingly, I am getting this error :

FRM-41335 : Populate_List : invalid column type
for column 1.



Regards
0
Comment
Question by:GoodHands_Delphi
2 Comments
 
LVL 22

Expert Comment

by:Helena Marková
ID: 10655434
"and another thing..."
FRM-41335:
This is from the on-line helpp "POPULATE_LIST built-in"
Removes the contents of the current list and populates the list with the values from a record group. The record group must be created at runtime and it must have the following two column (VARCHAR2) structure:
Column 1:      Column 2:
the list label      the list value

so as you can see the column type must be VARCHAR2.

For your first question - use When-List-Changed Trigger:
Fires when an end user selects a different element in a list item or de-selects the currently selected element.  In addition, if a When-List-Changed trigger is attached to a combo box style list item, it fires each time the end user enters or modifies entered text.
0
 
LVL 6

Accepted Solution

by:
musdu earned 20 total points
ID: 10655798
Hi,

to get sum of QTY field, create a new numeric field in the same block and set the property of "Number Of Items Displayed" to 1 (this will create a single occurrence item). Then set the "Calculation Mode" property to "summary" and set "Summary Function" to "sum" and "Summarized Block" to "UP_F" and set "Summarized Item" property to "QTY" and this is last one :) set the "Query All Records" property of block UP_F to "YES". When you execute a query on your block, your field will be filled with sum of QTY field.

regards.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now