Forms :: Update Field Based On Another Field Checkbox
May 3, 2013
I have a table where i need to update one field values based on another field of the same table , simply as it is.I have done this using one select all check box , on clicking that all check boxes of item_trans table will get selected , then i will un select some of check box and then using one button, i will update the value of the fields which are checked only.
I have put the sample code but when i am updating its taking long time and hanging.I am also attaching the form based on the test case provided.
--tables with insert statement
create table item_trans (trans_item varchar2(12),trans_qty number,trans_act_qty number)
insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE1',40,NULL);
insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE2',20,NULL);
insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE3',20,NULL);
--i want to set the value of trans_Act_qty as trans_qty
--i create one dummy or test block to keep the select all check box. for that table test script is
CREATE TABLE TEST
(
C VARCHAR2(2000 BYTE),
B NUMBER,
A NUMBER
);
insert into test (C,B,A) values ('A',1,1);
--code written in select all check box which is created on test.block.
BEGIN
GO_BLOCK('item_trans');
FIRST_RECORD;
LOOP
:M_END_YN := :M_END_ALL;
[code].......
--code written in M_END_YN ( actual check boxes where i will uncheck).
IF :M_END_YN = 'N' THEN
:M_END_ALL := 'N';
END IF;
--code written on button to update those values which are checked.
BEGIN
GO_BLOCK('item_trans');
FIRST_RECORD;
LOOP
IF :M_END_YN = 'Y' THEN
[code]......
View 5 Replies
ADVERTISEMENT
Nov 19, 2010
i have multi data block filed. and checkbox field which based on control block...My task is when i check checkbox only one field should enabled and my mouse goes to that field
e.g
item11 item21 item31 chkbox1
item12 item22 item32 chkbox2
Scenario like this :
My item field based on data block and checkbox based on control block,while i checked chkbox1 , only item31 on that current record should be enabled and i changed value only on that field
when i checked chkbox1 , my cursor goes to item31...not item32
View 12 Replies
View Related
Apr 23, 2009
I need to update a field with the 1st 9 characters of another field in the same record.
View 1 Replies
View Related
Jun 23, 2012
I have a table in which three field.
1)empid (Save employee code)
2)attendace_time (Save Date and inout time)
3)status. (Save in out Status).
I generate new form. which have four field.
1)empid
2)attendance_date base on attendance_time 3
3)Attendace_time base on attendance_time
4)Status .
Problem is that when i update the Attendace_time . date save first date of the month. when i update the attendance_date time save 12:00
View 1 Replies
View Related
Jul 9, 2012
I'm trying to restrict update in a specific field in my form . I have set its property(update allowed) to no and still the field is update able. I am also having on-commit trigger in my form level that well display a message and followed by the command commit. is it possible the trigger is overriding the property(update restriction).
View 9 Replies
View Related
Aug 6, 2013
I have seen in probably VB or Dot net software being used at some premises that there "formula computation is live and interactive".
What i means that suppose a cashier has made invoice having total of 83$. Mow in the text box for entering amount received, the cashier is about to enter 100 but surprisingly the returned value/remaining value (total invoice - amount received) is being computer LIVE.
This is what happens.
1) The cashier entered 1 and the remaining value instantly showed 82 (83-1)
2) then on other key stroke of 0 by cashier and then then the remaining value instantly showed 73 (83-10)
3) then on other key stroke of 0 by cashier and then then the remaining value instantly showed 17 (83-100)
Hence a continuous updation/changing of the remaining value on every key stroke is observed.
View 3 Replies
View Related
Apr 29, 2011
What i am required to do is to protect a field 'COUR_CODE' from update when the SHIP_METHOD='R'. c
if :system.record_status = 'INSERT' then
declare
vcour_code ACCOUNTS.cour_code%type := NULL;
vcourier_account_no ACCOUNTS.courier_account_no%type := NULL;
canvas_name varchar2(30);
begin
[code]....
View 11 Replies
View Related
Jul 13, 2011
I am having a problem with auto populating different fields based on inventory no. field.. This is a bug giving to me to work on and i not able to figure out how to populate the other fields.
How to set any triggers for the items to auto populate and i am suppose to finish this work today.
View 2 Replies
View Related
Apr 19, 2010
I want to display Week No as the heading.So, I have these:
define week_no=number
column week_col new_value week_no
select to_number(to_char(sysdate, 'ww')) week_col from dual;
I have tested it and it is working as the way I expected: select 'to display week no as column' "Week &week_no" from dual;
The output:
Week 16
----------------------------
to display week no as column ...So how do I display Week 15, Week 17 etc based on the calculation of &week_no e.g. &week_no+1?
View 19 Replies
View Related
Nov 27, 2012
I have partitioned the table based on field.But when I am selecting by Partition or by the field I am getting Explain plan as Table Access full.I am pasting the sql and Explain Plan here. The table has two partition by BOOKING_DT_WID. One less than 20100801 and other less than 99991231.
CODESELECT * FROM WC_BOOKING_SALESREP_F WHERE BOOKING_DT_WID >= 20100801;
SELECT * FROM WC_BOOKING_SALESREP_F PARTITION(SALESREP_LESS1_99991231);
Here is the Explain Plan for the same.
CODESELECT STATEMENT ALL_ROWSCost: 1,501 Bytes: 293,923,641 Cardinality: 809,707
4 PX COORDINATOR
[code]....
How do I know if the sql is doing partition prune.
View 1 Replies
View Related
Mar 19, 2007
I am attempting to update a single field in one table based on a select from two tables. However, I am receiving the following error.
ORA-00933: SQL command not properly ended
The sql I am using is as follows:
update PS_TRNS_CRSE_DTL
set RQMNT_DESIGNTN = 'TRN'
FROM PS_TRNS_CRSE_DTL A, PS_STDNT_CAR_TERM B
where (SELECT A.EMPLID, A.ACAD_CAREER, A.INSTITUTION, A.MODEL_NBR, A.ARTICULATION_TERM, A.TRNSFR_EQVLNCY_GRP, A.TRNSFR_EQVLNCY_SEQ, A.TRNSFR_STAT, A.GRADING_BASIS, A.RQMNT_DESIGNTN, B.STUDY_AGREEMENT
FROM PS_TRNS_CRSE_DTL A, PS_STDNT_CAR_TERM B
[code]......
View 6 Replies
View Related
Apr 26, 2010
In the query below, I'm attempting to replace task codes with task descriptions by left joining to a multi-purpose control table.
In our corp, the description for the task code varies based on the value of change_program in each record, so rather than referencing the value of code_index.tabl statically as I do in the query below (201), I need a dyanamic variable to be defined for each record based on the value of work.change_program, which would represent the value for code_index.tabl.
For each record
if change_program =1 then v_tabl = 201
elseif change_program =2 then v_tabl = 202
elseif change_program =3 then v_tabl = 203
else v_tabl = 201
how to declare and use variables.
SELECT account,
change_program,
task_code_01,
task_code_02,
task1.longdesc,
task2.longdesc
FROM work
[code]....
View 4 Replies
View Related
Dec 5, 2012
I have a table test with 10,000 records in it and 50 columns.I have to select those rows which contain values as "Sales Dum" in their field..For table with small number of colums i did this
SELECT * FROM tbl_website_dtl WHERE created_by like '%Sales%' or website_name like '%Sales%' or website_code like '%sales%';But should i do for table containing 50 columns.
View 5 Replies
View Related
Apr 23, 2010
Even though i am using COL1 CHAR(500) NULLIF COL1=BLANKS, then also i am getting same error for those columns.
View 13 Replies
View Related
Nov 29, 2012
I have a list sample:
Order#Location VendorName
--------- --------- ------- -------
145646842 MLIQUID02T 368308 JOHNNEISHA
134962284 MLIQUID02T 368308 JERRY
141138899 MLIQUID02T 368308 CARLENA
5078916 MLIQUID02T 368308 DONNA
[code]....
What I'd like to do is run SQL that can create output where I get 2 records from each Location. Example:
Order#Location VendorName
--------- --------- ------- -------
145646842 MLIQUID02T 368308 JOHNNEISHA
134962284 MLIQUID02T 368308 JERRY
13999694 MLIQUID03T 368308 TINA
175439805 MLIQUID03T 368308 RANDI
4801973 MLIQUID05T 368308 DIANA
55907648 MLIQUID05T 368308 DESIREE
Personally, I don't need the top value(s), but it would be nice.I was trying a few routes with rownum, and I can get it to pull 1 set of pairs with a where location= condition, but I can't seem to successfully combine the two.
View 1 Replies
View Related
Sep 26, 2012
I have a need to change the LOV of a page item's select list based on the selection in another page item's select list. So in other words, for a page item that is a select list, I need to use one LOV normally, and a different LOV if the value of a different page item is set to X.
A dynamic action would be useful here (on change where Select List 1 = x), but I don't know how to take the action of changing LOVsfor Select List 2 based on that action.
View 5 Replies
View Related
Jun 25, 2013
I have created a custom form which fetches certain records. There is a column called invoice_create_flag which is check box. By default when we query this form, value of check box is 'Y'. Another column is Amount.
Initially when form is called, all the records are selected. Hence it should show the total of all the records. Now If the users unchecks any record, System should deduct the amount of that particular record from the total amount.
Attached is form screenshot for reference.
View 1 Replies
View Related
Jun 16, 2011
Trying my best to follow the posting guidelines.
There are two tables.
orderheader and orderdetails. orderheader is a master table and orderdetails is a detail table. So for every one record in orderheader table, there are many records in orderdetails table. I want to update a field in orderdetails table from a orderheader table using inner join.
update orderdetails
set orderdetails.conversion_dt =
(select orderheader.conversion_dt
from orderheader, orderdetails
where orderheader.number= orderdetails.number )
I get the following error:
Error report: SQL Error: ORA-01427: single-row subquery returns more than one row 01427. 00000 - "single-row subquery returns more than one row"
*Cause:
*Action:
What mistake am I doing here?
View 16 Replies
View Related
Oct 13, 2011
I need to partition a existing table based on varchar2 field (which is actaully date value but storing as character in the table). Using below statement for creating table, but getting error.
create table TST_CUST_ARC
(
interact_id NUMBER(10),
extrn_id VARCHAR2(38),
src_cd VARCHAR2(25),
full_nm VARCHAR2(45),
run_control_date VARCHAR2(13)
[code]....
Getting error : ORA-00907: missing right parenthesis
View 5 Replies
View Related
Mar 29, 2013
generate the number of rows based on table field.
Sample code is given below.
CREATE TABLE T
(
docno VARCHAR2(10),
CODE VARCHAR2(8),
QTY NUMBER(3)
)
LOGGING
View 4 Replies
View Related
May 9, 2013
I am New to Apex. Im using Apex Version 4.2.
I have a tab named APPROPRIATIONS it has 10 fields. Among which is PROJECT NUMBER, AUTHORIZAION DATE (CALENDER TYPE POPUP), And FUNDS CHECK FLAG.
The Scenario is depending upon PROJECT NUMBER the Fields are Populated including FUNDS CHECK FLAG .
But the AUTHORIZAION DATE is a MANDATORY field has to be filled by User
The Requirement is to make AUTHORIZAION DATE as MANDATORY only when the FUNDS CHECK FLAG is *"BLANK "* or *“Y”*
If the FUNDS CHECK FLAG is *“N”* then the AUTHORIZAION DATE to be made OPTIONAL.
View 2 Replies
View Related
Jun 29, 2010
I am trying to execute an UPDATE from a field that may have more than row. I get ORA-01427: single-row subquery returns more than one row.
I need to set the careof column in owner table to hold the name (NAM) from the alt table if the alttype from alt is ATT. We could have more than one id and the careof names can be different.
This is my query:
UPDATE owner s
SET s.careof = (SELECT a.NAM
FROM alt a
WHERE a.taxyr = '2011'
AND a.alttype = 'ATT'
AND a.card in ('0')
[code]....
View 1 Replies
View Related
Mar 28, 2011
I'm trying to update a field from another field in the same table.
I got a Table with 3 fields.
CREATE TABLE CONTENT
( LID_id NUMBER(6,0) NOT NULL ENABLE,
LPRECIS VARCHAR2(4000 CHAR),
LCOMMENT VARCHAR2(4000 CHAR)
)
How to update "LPRECIS" from "lCOMMENT" only where "LPRECIS" is NULL ?I used this statement but it's wrong.
UPDATE CONTENT
SET LPRECIS=(SELECT LCOMMENT
FROM CONTENT
WHERE LPRECIS IS NULL)
View 2 Replies
View Related
Jun 11, 2011
I have a requirement to load data into database column based on the value coming from input field.
E.g. :
Input:
EmpNo, DeptNo, Sal
1234, 10,1000
1234,20,2000
1234,30, 3000
1234,40,4000
2345,10,100
2345,20,200
2345,30,300
Output:
Emp No, Dept_10_Sal,Dept_20_Sal,Dept_30_Sal,Dept_40_Sal
1234, 1000, 2000,3000,4000
2345,100, 200, 300,0
Here we have more than 500 columns like this Dept_10_Sal, Dept_20_Sal........Dept_500_Sal.
View 32 Replies
View Related
Apr 24, 2013
I would like to populate a text box based on selection from a LOV. If someone selects a LOV value and then tabs off off of that element, I would like the text box populated from a sql statement based on the LOV value in the predicate.Application Express 4.1.1.00.23
View 1 Replies
View Related
Oct 30, 2011
i need to update field AA with zeros before the number (max 4 digits) for example: 1 = 0001 , 13 = 0013 , 1234 = 1234 .
View 1 Replies
View Related
Nov 14, 2011
I have a table called Customer_Type with following fields
Customer_type ,Active_date, Inactive_date
regular,11/01/2011
daily,11/04/2011
monthly,11/05/2011/11/11/2011
Tbale 2:Customer
Customer_name,Customer_type,Customer_Inactive_date
John,regular,
James,monthly,
Jake,daily,
Jill,monthly
What i wnat is to update the Customer_inactive_date with the Incative_date field from Customer_type based on their Customer_type... So james and Jill would have their rows updated in this scneario ..How can i achive this in pl/Sql
I have teh code using merge function..I want something in traditional old fashion..
The sql statements are below
CREATE TABLE CUSTOMER_TYPE
(
type_code VARCHAR2(10),
[Code]....
View 5 Replies
View Related
Oct 4, 2011
I need to concatenate string to the number field in an update statement like this:
update test1 set model_pin = seq_no || '_' || model
where eoc_code like 'AEW%'
When I run this command in sql , I get ERROR at line 1:
ORA-01722: invalid number
View 7 Replies
View Related
Nov 26, 2012
We are using APEX 4.2, 10GR2, RedHat5.
I have a report that comes from SQL Query (updateable report). I'm using the apex_item.text and apex_item.hidden on fields. I'm using a button to submit and after submit process to add some logic that I need.
There could be 1 - 10 records in the report. There is only 1 field that is needed to enter a value, but the value of this field determines the value of another field. I think that I can do this with a submit button and an after submit process where I loop through all the records. I think I have this handled.
This is the question
When the value of that field is changed then the value of another field in the same row changes immediately. All the examples I've seen so far are for a single record and that doesn't work for us.
I guess this is a MRU process but I haven't seen an example where a dynamic action is possible on a Multi Row Update.
View 4 Replies
View Related
Oct 18, 2012
Let's say that we have an order entry app and the price and quantity items are already populated. We now want to show the user the extended price (the product of the first two items). the extended price would automatically display after both the quantity and price items are entered. I'm assuming that would require some kind of client-side processing. I imagine server-side processing is simpler, so I'll lean in that direction. I'm sure we've all seen web sites that require you to click a button for the order totals to be updated. I'm okay with that approach, but I haven't quite put all of the pieces together. Here's what I came up with.
A region button was added to trigger the updating of the extended price. The button's "Action When Button Clicked" is to submit the page. Under "Page Processing", a process was created to do the calculation with the recipient of the product being a page item. From debug code in the procedure, I can see that the item containing the extended price was, indeed, modified. But the new value doesn't display in the field and the Session window shows that the value of the item didn't change.
I must be missing something. The debug code says the item value was updated. The Session window says it wasn't updated. What gives? What did I do wrong and what needs to be done to correct this?
View 3 Replies
View Related