How to pass a value from table in to another using java-oracle script: apex 5.0
Hello
Step 1:
Two Table (product, product 2)
Created an IR where all data are from Table Product
-> a cell in the column is editable.
Step 2:
Whenever the user change certain values of cell and click on the button set to day then cell value must also be updated in the table leader2.
-> entire product line (table) must be inserted into the product 2 (table) with update of the cell value.
JS:
var arr_f01 = [];
() $("input[name='f01']").each
function() {}
If ($(this).) Val() > 0)
{
arr_f01.push ($(this).) Val());
}
});
(apex). Server.Process
"Update".
{f01: arr_f01,}
{dataType: "text", success: function (pData) {alert ("' data inserted into the Table Product");}}
} }
);
Thank you.
Hi Dominique,.
Pranav.Shah wrote:
Hello
Step 1:
Two Table (product, product 2)
Created an IR where all data are from Table Product
--> A cell in the column is editable.
Step 2:
Whenever the user change certain values of cell and click on the button set to day then cell value must also be updated in the table leader2.
---> Whole product line (table) must be inserted into the product 2 (table) with update of the cell value.
JS:
var arr_f01 = [];
() $("input[name='f01']").each
function() {}
If ($(this).) Val() > 0)
{
arr_f01.push ($(this).) Val());
}
});
(apex). Server.Process
"Update".
{f01: arr_f01,}
{the data type: 'text', success: function (pData) {alert (' ' data inserted into the Table Product ');}}
} }
);
Thank you.
Follow the steps below.
Step 1: Give static id to the other columns in your interactive report
Attributes of the region-> column-> Id static definition
Step 2: change your Javascript code to read values of other columns
check the line no 8, in this way, you can read the value of other columns and push that in table
This is the static id of the column I given EMPNO.
do the same for the other columns you want to insert.
var arr_f01 = []; var arr_f02 = []; var empno; $("input[name='f01']").each( function() { if($(this).val() > 0) { empno = $(this).closest('tr').children('td[headers="EMPNO"]').text(); arr_f01.push($(this).val()); arr_f02.push(empno); } }); apex.server.process ( "Update" , { f01: arr_f01, f02: arr_f02 } , { dataType: 'text',success: function(pData){alert('Data Inserted in Product Table'); } } );
Step 3: use tables in your ajax process to insert the record., replace your table name and the columns
begin for i in 1..apex_application.g_f01.count loop insert into test(A,B) values (APEX_APPLICATION.G_F02(i),APEX_APPLICATION.G_F01(i)); commit; end loop; end;
Hope this helps you,
Kind regards
Jitendra
Tags: Database
Similar Questions
-
How to pass the value of the run-time file .sh by Oracle procedure
I have a file test.sh that contain
#1/bin/bash
exp test/test@orcl file=/home/oracle/dump/test.dmp log=/home/oracle/dump/test.dmp grants = Y = index constraints Y = Y = (test) owner statistics = none
Exit 0
I craete a work called Create_job_proc in this work, I want to pass the value of job_action is the location of the file test.sh to
/U01/home/Oracle/dump/test.sh and want to spend the test/test@orcl as a variable...
Please suggest me... how to pass the value of Job_Action which will replace the .sh file content test/test@orcl to the value of the time of execution as scott/tiger@hr
Thank you much Parth... It works perfectly...
Thank you all for your help...
-
How to insert the value from the FORM to another database table?
Hi all
I have the following problem.
I have a form that has a tabular layout for the MATURED_FD_DTLtable. (all about 20 line items)
CREATE TABLE MATURED_FD_DTL
(
ACCT_FD_NO VARCHAR2 (17 BYTE) NOT NULL,
CUST_CODE NUMBER (9),
FD_AMT NUMBER (15),
FD_INT_BAL NUMBER (15),
TDS NUMBER (15),
CHQ_NO NUMBER (10),
CREATED_DATE DATE,
CREATED_BY VARCHAR2 (15 BYTE),
PREV_YR_TDS NUMBER (15),
ADD_FD_AMT NUMBER (15),
DESCRIPTION VARCHAR2 (100 BYTE),
P_SAP_CODE NUMBER (10),
P_TYPE VARCHAR2 (1 BYTE)
)
By clicking on 'SAVE' button, all values will be automatically is stored in the MATURED_FD_DTLdatabase table.
But I want to insert these values in another table called TEMP.
I want to insert values of form only, no table select.
How can I do this?
Help me.
Is Oracle Designer 6i.
Answer:
BEGIN
Commit_form;
PREMIER_ENREGISTREMENT;
LOOP
insert into TEMP_MATURED_FD_DTL
SELECT * FROM MATURED_FD_DTL WHERE ACCT_FD_NO =: acct_fd_NO;
WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
NEXT_RECORD;
END LOOP;
PREMIER_ENREGISTREMENT;
COMMIT;
MESSAGE ("RECORD UPDATED AS PAID '");
MESSAGE (' ', no_acknowledge);
END;
-
Who knows how to pass a value from the form on the next page of javascript?
I have a simple drop-down list. Maybe this isn't the best way, but I use the MM_goToURL function on the onchange event. It works very well so he can redirect without clicking on the submit button.
What I need to do, it's pass the value selected on the next page and grab it so I can use Coldfusion to manipulate the results.
Help, please.The answer is too simple. Just use javascript to submit the form onchange.
-
How to pass the value of the element from one form to another form?
Hi all
I need your help to complete this task.
I have a form page named reserve form.i have some five fields selection list in the form of reserve, after I chose the first value from the selection list, I create a button in the form of reserve, when I click on the button create, it will open another form page named set form in this form page , I have a field selected, the list of values in configure the form depends on the values selected as a reserve, it means that I have to change the value of page of a form to another form.
Please suggest a solution, how to pass the value?
Thank you
Robette.Check out the button create on Page 8.
In the Action when the button is clicked, the configuration is
The value of these P35_IT_PRODUCT
With these values & P8_IT_PRODUCT.Kind regards
-
How to pass the value of the variable record type in the procedure
Hai All
My Question is
I have a table named Emp and the structure
ID Varchar2 (25)
Name varchar2 (25)
Number of salary
And now, I created a folder named Rec_Emp
Like this
Type Rec_emp is made
(Rec_Id varchar2 (25),)
rec_name varchar2 (25).
Number of Rec_salary);
rec_emp emp_record;
I created a SQL type
Now how to pass the value type in the procedure
Thanks and greetings
SrikkanthMYou are looking for something like this
create table my_emp (id integer, name varchar2(100), sal number) / create type my_emp_obj as object(id integer, name varchar2(100), sal number) / create or replace procedure insert_into_my_emp(pEmp_Obj in my_emp_obj) as begin insert into my_emp (id, name, sal) values(pEmp_obj.id, pEmp_Obj.name, pEmp_obj.sal); end; / begin insert_into_my_emp(my_emp_obj(1,'karthick',1000)); end; / select * from my_emp /
-
Hello.. I'm creating an application of streaming, in which I have a list field in a screen like this...
1
--------
2
--------
3
--------
and when the item 1 is selected means a url must be passed to the video player...
I created the list field screen in a package and a video player in other package... but I do not know how to pass the value of the field from the list to the player... Help, please... its URGENT...
You can get the index selected by the listname.getSelectedIndex () method and compare that value with Vector data (data store URL) .that you will give a correct value from the URL and pass it.
-
Passing the value from one page to the other page
Hi gurus,
I need to pass the value from one page to the other page and two pages use different AMs.
In the first page I have sellers results region table where the $vendor_name column is a hyperlink that navigates to the page Vendor_Sites. Now after accessing the second page, I want to excute the VendorSitesVO in PR of CO based on the value passed to VendorsVO (vendor_id) of first page.
can someone help me on this?
Thank you
Vincent.
Published by: user4933347 on December 4, 2009 12:19 AMYou can set parameters of Pagecontext and transmit values through them. These values can be passed between pages, even if the AMs are different.
Try:
pageContext.putParameter ("Parameter1", value1);
pagecontext.setForwardURL (second page)Concerning
Sumit -
How nagivate values from one page to another page as well assured in different modules like po and pon?
I tried using the session values, hashmap, and Transaction. But none worked.
Please help me on this.
Dilip thanks.
My problem is solved.
I solved the issue.using the main concepts of java.
By importing a package into other package and then instantiate the required class.
Kind regards
2793235.
-
Hello:
How to configure contextual events publish several values of payload?
On click of a button, I'm declaritively publish a contextual event, which works very well when a single value is passed to the event handler.
My event handler method has the signature of:
eventHandler (String)
But now I also have an oracle.jbo.domain.Number, so my new eventHandler looks like this:
eventHandler (Number, String)
How to pass two values during editing of the event and how to place the payload with multiple values for the new eventHandler?
All article or code would be greatly appreciated.
Thanks for the help.You define a bean holding your values and pass an instance of the bean as a payload...
Timo
-
How to pass the value of the item Application Javascript function.
Hello
I have the JavaScript in the properties attribute of the HTML Form element
I'm on page 1 and passing the value of the item page P1_DEPT_NO. It is perferctly working very well and I am able to get the exact value of the element on the page
I'm on page 1 and passing the value G_DEPT_NO of the Application element .onchange="javascript:function1($x('P1_DEPT_NO').value);"
The problem here is, I don't get the point of Application inside the javascript function value.
I tried to use alert(); and it gives me the undefined value
I just want to know, How to pass the value of the Application in Javascript element.onchange="javascript:function1($x('G_DEPT_NO').value);"
Thank you
DeepakDeepak,
I'm not a Javascript expert, but the suggestin I did was because the javascript is a case-sensitive... language and thats why onChange is not the same thing as onchange.
Not sure if this is causing the problem.Application elements not associated with a page and have therefore no properties user interface.
So, as mentioned in another post, the rendering would not work for the elements of the application.
If it is for a single item, used only on this page, you might create a hidden page element and use it fo your goalIf you want to keep watching objects application and AJAX, this page contains examples of using AJAX to solve problems like the one you mentioned.
http://www.Oracle.com/technology/OBE/hol08/apexweb20/ajax_otn.htm#T1BThank you
Rajesh. -
Pass a value from a PL/SQL function to a javascript (html header)?
Hey guys,.
Have a question on how to pass a value of a PL/SQL to a JavaScript function in the HTML header.
I created a PL/SQL function in my database, which makes a loop.
The reason is: on my apex page when the user selects a code, it should display (or highlight the buttons) the different project id is present for that particular code.
example = code 1
a project id = 5, 6, 7
code 2
a project id = 7.8
Thank you for your help or Suggestions
Jesh
The PL/SQL function:
Contact_details (ACT_CODE1 in NUMBER) of the FUNCTION to CREATE or REPLACE RETURN VARCHAR2 IS
Project_codes varchar2 (10);
CURSOR contact_cur IS
SELECT ACT_CODE, PROJECT
OF ACTASQ. ASQ_CONTACT where ACT_CODE = ACT_CODE1;
currec contact_cur % rowtype;
/******************************************************************************
NAME: contact_details
PURPOSE:
REVISIONS:
Worm Date Description of the author
--------- ---------- --------------- ------------------------------------
1.0 06/25/2009 1. Created this function.
******************************************************************************/
BEGIN
FOR currec in contact_cur LOOP
dbms_output.put_line (currec. PROJECT | '|');
Project_codes: = currec. PROJECT | '|' || Project_codes;
END LOOP;
RETURN Project_codes;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHILE OTHERS THEN
-Consider recording the error and then re-raise
LIFT;
END contact_details;
/
-
passing the value of the item to another page
Hello!
I have a few questions while passing the value of the item to another presentation page and page refreshes.
I have a page (page n ° 2) with more areas where users can fill data in some articles (text box, popups,...), then I have a region report report and button to enter a new item. When users, click the button is it redirects to another page (page no. 21), where the user enters the values to other elements (popup, text box,...) then I have 3 buttons on this page ('Cancel', "create one", "create an and create another") and now I don't know how to handle the button ' create a. Action for the button "create one" I want is that when button "create one" is clicked in a table (in my DB) should be inserted some values of page 2 and certain values on page 21, then users should be redirected to page 2, where you can see everything that you see before the user has clicked 'enter a new element button' (so all the values in the elements of the page 2 must be visible) + in this report in the region must be updated (so you can see the inserted elements on page 21)
I hope you understand what I mean and you can help me. And sorry again for my English.
Kind regards
DraganYou can create a collection and use it in this way:
IF apex_collection.collection_exists ("YOUR_COLLECTION") = TRUE THEN
apex_collection.delete_collection (p_collection_name-online 'YOUR_COLLECTION');
END IF;
apex_collection.create_collection (p_collection_name-online 'YOUR_COLLECTION');-Value added to the collection
apex_collection.add_member ("p_collection_name-online 'YOUR_COLLECTION', p_c001 => ' value to save");-get the value of collection
Select C001 in apex_collections where collection_name = "YOUR_COLLECTION";Go through this link to learn more about the collections http://docs.oracle.com/cd/E17556_01/doc/apirefs.40/e15519/apex_collection.htm
OR
as you say if its only id you want to perform, then simply create an item hidden in your page 2 =>: P2_ID_SO, then capture the value in your 2 page deal and use it in page 21.
-Manu
-
How to retrieve a value of page element in another page?
Hello
How to retrieve a value of page element in another page?
say P55_COURSES_TO_EVALUATE is my name of the page element, and it is a selection list. Based on the value selected in the next page I see the details of the selected value shd and for that I need P55_COURSES_TO_EVALUATE value in the following page. How to do it? When I try to retrieve the values it simply returns nothing.
Pointers would be really useful.
Thanks in advance.Hello
Could you please how you try to use it?
If you set the value to the P55_COURSES_TO_EVALUATE element and submit the page, the value is stored in session state.
Then you can use this element in any page as:P55_COURSES_TO_EVALUATE
You cannot access page value in javascript/jQuery to other pages like
$v('P55_COURSES_TO_EVALUATE') document.getElementbyID('P55_COURSES_TO_EVALUATE') $(#P55_COURSES_TO_EVALUATE)
Because the item is not on the other pages. In javascript from other pages, you can use
var a = '&P55_COURSES_TO_EVALUATE.';
Kind regards
Jari -
How can I copy files from project Waveburner to another internal drive?
How can I copy files from project Waveburner to another internal drive without losing the connection to the files audio orig.?
Thank you for your time,
Since no one answered my call, I sat and researched and studied WaveBurner behavior and I can myself answer my question and solve. Since there were a lot of people asking similar questions on WaveBurner files I will post what I learned.
Whenever you drop your audio files in the list window to make your WaveBurner CD copy not copy your audio files, but relies on the original audio file, where they are located. So whenever you move the files orig. and you open WaveBurner, it can't find those and displays an error window to suggest it will search for the missing file or if you know where he is now lets you find manually. WaveBurner usually place the .wb3 project file that contains everything including your home folder.
For this reason, I reserve now an audio file WaveBurner also folder in my home folder. In order to save themselves from WaveBurner cannot find the audio file, all audio files that I do, I put in my folder of audio files WaveBurner first, then copy them in WaveBurner from there.
When I need to use a bigger hard drive I copy .wb3-WaveBurner projects based, but also my
Sound folder WaveBurner for the home folder on the new hard drive.
WaveBurner is now all audio files without problem.
I hope that this will be a unique problem to someone else. Happy WaveBurning.
W.W.
Maybe you are looking for
-
How can recover my Skype account when the customer service is not response yet in 24 hours?
Dear friend, I can not connect to my Skype account, but I changed the password. I contacted Skype customer service and signed a form. The customer service said I would reply with 24 hours. But I still don't respond after a day still. I'm really worri
-
Toshiba Satellite C50t - A - battery life is very short
Hi all I have problem my C50t-A battery life is very short (less than two hours) and use usually laptop for reading, then how to check actual life of the battery and if there is problem in my battery. The application of integrity monitor shows me the
-
HDR-AS100V long recording of split files
Long records where the size of the file is more than 4 GB is stored as files of 4 GB split (4'175 ' * KB). Is there a way to disable this option, so a long recording is stored as a file? Also another question is PlayMemories home do not meet these fi
-
Analysis of configuration error
I have an error that will not allow a new game to open it. The States of error: error analysis of the C:\Windows\Microsoft.NET\Framework\v2.0.50727\config.machine.config Parser returned the error 0xC00CE556. The only option is to select OK and anothe
-
THE TH UNDER APPLICATIONS FIREWALL LOG IT SHOWS C:\WINDOWS\SYSTEMS32\SVCHOST. EXE, THEN THE ACTION IS BLOCKED I DON'T UNDERSTAND WHAT IS PAST. SOME OF THE MOMENTS WHERE I AGREE MY COUSIN TO CHECK COMPUTERS, THE GUARANTEE WILL POP UP AND SAY SOMEONE