Forms :: Calculation Mode With Conditions
Sep 24, 2013I have 2 fields f1,f2
I define f1 a summary in calculation mode
I want to sum f1 where f2 = 5
I have 2 fields f1,f2
I define f1 a summary in calculation mode
I want to sum f1 where f2 = 5
SELECT
MAX(fndattdoc.LAST_UPDATE_DATE ) as LAST_UPDATE_DATE,
MAX(DECODE(fndcatusg.format,'H', st.short_text,NULL,st.short_text, NULL)) as COMMENTS,
MAX(fnddoc.description) as REASON
FROM fnd_attachment_functions fndattfn,
fnd_doc_category_usages fndcatusg,
fnd_documents_vl fnddoc,
fnd_attached_documents fndattdoc,
fnd_documents_short_text st,
fnd_document_categories_tl fl,
WSH_NEW_DELIVERIES DLVRY
[code]....
I have three tables, I have to merge those three tables, all three tables having same conditions and filter conditions(in each table one filter condition changed), I highlighted in the red difference the filter conditions in each table, finally my result should be 7 columns like
LAST_UPDATE_DATE, COMMENTS, REASON, CORRECTD_ACTUAL_DELIVERY_DATE, LAST_UPDATE_DATE, CORRECTD_PROMISE_DATE, LAST_UPDATE_DATE
I am developing a form where I need to add Numbers.In fact we have a bag of Cones that contain 24 cones.In normal calculation when I add numbers for example
5.24 Plus 5.24 it will give the result 10.48
I Need the appropriate method to calculate if I add these two numbers it should give the result 5.24 Plus 5.24 the result should be 12
Currently I am working on payroll system where I have to calculate employees working hours/late coming hours/early going hours against its roster which is defined in the beginning of every month/week.
In roster form user define shift of every employee like
Code Name Shift
7 Saad Nafees A - 09:00 17:00
492 Muhammad Nasir Shahzad B - 17:00 01:00
243 Muhammad Tahir C - 01:00 09:00
Roster table structure
code varchar2
name varchar2
Shift date
Remarks varchar2
shift table structure
code varchar2
timein date
timeout date
latetime date
Hdaytime date
Oracle stores both date and time information in date data type, suppose today user change shift timings from 17:00 to 17:30 or user change timein/timeout in attendance form then oracle will store current date with user define timings.
Now this is the main problem which I am facing because whenever you calculate difference between timein and timeout or compare with its roster then output comes wrong because oracle returns total no of hours whenever you minus two dates.
I have a database block that refreshes using a timer. In short, I list all open work pieces for a certain garage, displaying route, run, on_time, of_time, location grouped by garage, on_time, off_time
I need to highlight every garage with a different color. I am highlighting the on_time every time the garage changes.
The problem is, every time I move down the records, instead of keeping the previous garage color, and highlight the new garage on_time with a new color, the whole on_time column will be set to the current garage color.
I need to break down the block by color so the user can distinguish between the different garages, and the start and end time. Here is my code, I am putting it in when_new_record_instance of the work_block:
IF :work_bLock.current_garage = 9006 THEN
Set_Item_Property('work_block.on_time', BACKGROUND_COLOR, 'r191g223b191');
ELSIF :work_bLock.current_garage = 9002 THEN
Set_Item_Property('work_block.on_time', BACKGROUND_COLOR, 'r255g228b196');
ELSE
Set_Item_Property('work_block.on_time', BACKGROUND_COLOR, 'r255g250b250');
END IF;
I need the block to be 3 or more different colors depending on the garage.
I'm getting trouble in getting the sum of all the product's prize present in the form fields of invoice form. For example, I user bought 2 products so I want to get there prize sum in the total box. I first want that I've QUANTITY, DISCOUNT and SELLING PRIZE.
If I multiply Quantity with Selling Prize then I gets the result in Product and Quantity Total Box. However, Now I want to add discount option in it. Means if user is providing 10% discount to his/her customer then Quantity * Selling Prize - Discount% becomes a result in product's solution final prize box.
Here is the pic..
Look...Now here..I've added 22 in quantity.. now if I'll insert 10% in discount then the total will comes in Amount Display Box.
I'm currently using this coding on on Prize Box..
:SP_PRODUCT_PTOTAL := NVL(:SP_PRODUCT_QUANTITY,0) * NVL(:SP_PRODUCT_PRIZE,0) * NVL(:SP_PRODUCT_DST,0) / 100;
I'm creating an on demand software. I have 3 text boxes on my form
1st text box will carry Product's Actual Price
2nd text Box will carry Product's Selling Price
3rd text Box will carry Profit..
3rd one is display item..this will carry "selling price - actual price" and then result into 3rd box.. that would be profit..
my query is select nvl(:PL_PRODUCT_SELL_PRICE, 0) - nvl(:PL_PRODUCT_ACT_PRICE, 0) INTO :PL_PRODUCT_PROFIT FROM SBM_PRODUCT_LIST;
how can I move Proceed? I've currently applied this trigger as POST-query on form and POST-CHANGE on :PL_PRODUCT_PROFIT
How To Display Runtime Calculation in cursor for example in loop i define xyx number then add + 1 in xyz and move its value to block item until loop valid but in display no value shown but if i apply message(xyz) then it also shown the answer is correct but with message style i click every time in message but i want that with some delay form automatically show the value of xyz in block field.
View 3 Replies View RelatedI am able to run this query in Sql Prompt.
DEFINE Today = TO_DATE('03.12.2004:10:34:24','DD.MM.YYYY:HH24:MI:SS')
SELECT TO_CHAR(hiredate,'DD.MM.YYYY:HH24:MI:SS') "Hiredate",
TO_CHAR(&Today,'DD.MM.YYYY:HH24:MI:SS') "Today",
trunc(86400*(&Today-hiredate))-60*(trunc((86400*(&&Today-hiredate))/60)) "Sec",
[Code]...
It gives proper / desired results. I want to use it on my Form, how can it be done?
I'm facing a problem where I create a form and I want to feed time in "HH:MI" format, Firstly I choose the "Date" datatype, but during the feeding of time i.e "00:30", means if I want to feed only mints, then it doesn't accept, at the other hand if I feed "01:30" means mints with hr then it accepts.
To get rid of this problem I changed datatype "Date" to "Varchar2".
I create 3 columns on my form "TTL_WORKING_TIME" - "TTL_RUN_TIME" = "BRK_DWN_TIME". If I get any value in "BRK_DWN_TIME" column thn it has to be distribute in 3 or 4 reason of B/D, means if I get 00:30 mints brkdwn thn 00:15 mints for "reason1" and 00:15 mints for "reason2".
How I make calculation where I use "Varchar2" datatype.
I want to run form 10g in mode debug, however when i set break point in code and press shift+ F9 ( or run Debug by click icon on Form 10) then Form still run but not run in mode debug. Now i want to run form 10g in mode debug, how do i do?
View 2 Replies View RelatedWhen I used to work with foxpro we had used dot matrix printer. At that time if we want, we can print in normal mode, expanded mode and compressed mode. it will be part of your spool file.
Now am printing a text file from forms using text_io package. I would like to know in this how do i print the content in compressed mode using CHR function or some other method.
Is there any property that can be set at design time or dynamically altered during runtime about the default mode in which a form opens? I have created a new FORM in Forms 6i and it opens in the Enter-Query mode. I do not want to open it in the Enter-Query mode. This is because I will be doing my own execute_query on some click of a button in the form. How do I alter this Enter-Query mode in which the form opens?
View 2 Replies View Relatedhow to change form in updatable mode?
View 1 Replies View RelatedWhen i entered for modification/deletion process initially i prefer to entry-query mode then execute the query.
Suppose when i am in entry-query mode but i want to cancel(abort) the mode ie. entry query. How to achieve this.
How do I close a window in query mode?My form has a button "Populate from Charge Master" which opens a window containing a List Item (Department Names) and 2 buttons,
1. "Select the Dept" and
2. "Cancel"
The WHEN-BUTTON-PRESSED trigger code for "Populate from Charge Master" button is as follows:
begin
SHOW_WINDOW('WINDOW_POP_FROM_CHARGE_MASTER');
go_block('bl_med_dep');
enter_query;
end;
Code for "Select" button in the window is:
populate_from_charge_master(:bl_med_dep.med_dep_code,:bl_med_charge_party.charge_party_no);
execute_query;
COMMIT;
HIDE_WINDOW('WINDOW_POP_FROM_CHARGE_MASTER');
GO_BLOCK('BL_MED_CHARGE_PARTY');
EXECUTE_QUERY;
Code for "Cancel" button in the window is:
BEGIN
hide_window('WINDOW_POP_FROM_CHARGE_MASTER');
show_window('WINDOW1');
GO_BLOCK('BL_CHARGE_COMPANY');
END;
Here WINDOW1 is the main window and WINDOW_POP_FROM_CHARGE_MASTER is the window which must be closed when "Cancel" button is pressed.
When I remove "enter_query" statement in "populate from charge master" trigger code, I am not able to select any of the departments from the list. and If I have that statement, I am not able to hide/close the window.
What to write in a form for getting data after pressing TAB in 'ENTER-QUERY' MODE on a field having a LOV i.e. a trigger / program unit or what?
View 12 Replies View RelatedI have created a custom form. I have field called Order No. When i query on Order no.. i should be able to pick order no as well as other fields related to it. how do i acheive this functionality. I mean the f11 and ctrl f11 querying functionality.
View 18 Replies View RelatedAm developing a custom form. I have a block with 5 Items and one button(SUBMIT). When I go in query mode (F11), SUBMIT button to be disabled. How do i achieve this.
View 22 Replies View RelatedI currently have a form in which a master block populates a detail block. when the master is populated the cursor automatically goes to the detail block and sets it to enter query mode (due to the face that there are multiple details but the user may only view one at a time). To select the appropriate detail the user may select the detail from a LOV which is activated by clicking a button. once the detail has been selected and the query executed there is no real need for the LOV as the user can now edit/delete the detail. Also when adding a new detail there would be no need for the LOV as the presence of it would only confuse users. So basically the only time the LOV is usefull is during query mode to query the detail the user wants to edit/delete.
View 1 Replies View RelatedI have to create a form and i have to use trigger when-validate-item in enter-query mode . I have read trigger when-validate-item can not use Enter Query Mode . Is there any way to do this when i enter-query?
View 5 Replies View RelatedI am using Forms 6i,Oracle 10g. In a form I created, I have 3 blocks, first is a toolbar type with buttons to save, exit etc., other two are one master and detail data block.
how to get the default Oracle toolbar with the buttons, save, delete etc. I dont get in my form.
When the cursor is inside the detail block and then I click on an EnterQuery button in the first block, how do I clear the detail block, using the on btn press code.
What happens when I click the Enter Query button, is that the cursor and current block becomes the button block and when I run the command ENTER_QUERY, no use.
I need to set the block in which the cursor is to be cleared for query, whether it is master or detail, by pressing the button on the first block.
How to create horizontal and vertical scrollbar at a time while design mode??
View 2 Replies View RelatedAt once when I open the form when I press F11 it is not entering query mode. But if I type something in the text box placed in the form then I press F11 means it is asking "Do you want save the changes you have made?" if I press yes or no, no matter it is going for query mode. How to go to query mode without typing something in it?
View 13 Replies View RelatedI have a form in which there are three blocks A,B and C. When I press F7, the form enters Enter-Query Mode and all blocks clear except block A's one item. Say, Block A has 5 items, Item1, Item2,.. Item5. When I enter Enter-Query mode, Item2 of block A is not cleared and rest all are cleared.
View 2 Replies View RelatedI have one form in which I need to change cursor style to busy while doing some process and after completing that process cursor should get to default.I have done changing cursor style but during its busy state it is allowing me to change values or click buttons.It should not allow user to change anything or click any button.
View 1 Replies View RelatedHow can i sort data in the execute Query mode during runtime,i have a columns which has number, char and date field.
This below data is fetched in execute query from a table;
x1 x2 x3
1343 adfa 11/14/2012
1353 adfa 11/11/2012
1333 adfa 11/10/2012
1333 adfa 11/12/2012
1353 adfa 11/09/2012
now i like to sort like this below;
x1 x2 x3
1343 adfa 11/09/2012
1353 adfa 11/10/2012
1333 adfa 11/11/2012
1333 adfa 11/12/2012
1353 adfa 11/13/2012
how to do it?
I have a form with multiple tabs, each tab showing one data block. Many of the blocks are standard in enter-query mode. I want to allow the users to navigate through the tabs while the blocks are in enter-query mode.how can i do this?
View 3 Replies View Related0 down vote favorite
I have one table in database that contains 3 foreign keys to another tables(this three tables name are: manager,worker and employee). in each row only one foreign key is filled.I need to write one query that with attention which column of fk is filled in where clause specified condition is performed. I write simple query in jpa but doesn't work properly
select b from allEmployees b where b.manager.name= :name OR b.worker.name = :name OR b.employee.name= :name
You think i can do a from clause with conditions ??
The reason is that i need to retrieve fields from different schemas depending on a column in a common table
let s say the column CRITERIA_COL is in table Common
If COMMON.CRITERIA_COL has value 1 then the select query should fetch results from the schema : SCHEMA1.MY_TABLE
If COMMON.CRITERIA_COL has value 2 then the select query should fetch results from the schema : SCHEMA2.MY_TABLE
If COMMON.CRITERIA_COL has value 3 then the select query should fetch results from the schema : SCHEMA3.MY_TABLE
Something like this:
Select my_Col1, my_Col2 from
(case COMMON.CRITERIA
when '1' then SCHEMA1.MY_TABLE
when '2' then SCHEMA2.MY_TABLE
when '3' then SCHEMA3.MY_TABLE
)
but that is not working .By the way my query is not just that, it s a more complicated query, that s just the portion I am having trouble with .