Solved

Calculate Sum of Field and populate list error

Posted on 2004-03-22
2
748 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
automatic email alert 1 50
Oracle SQL 6 57
Queries 15 38
Oracle 12c Localhost trying to create a Migration Repo, need help with User creation. 13 27
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

770 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