Accessing set item value in PL/SQL

We are setting item2, item3 values based on item1 value using dynamic actions.
And we are trying to insert these values into a table using aPL/SQL block. Item2 and item 3 are going null in the table.
Item2 and item 3 values are inserting fine if we use "Automatic Row Processing" process.
Please let me know how to access these values in PL/SQL block to insert into a table (instead of nulls).

How? Provide full details of the DA, including any JS or PL/SQL code.
If you are using a PL/SQL code DA, are you specifying the item2 and item3 values in the Page Items to Submit DA setting?
We are using set type "SQL" Dynamic action. "select val2,val3 from tbl1 where col1=:item1;"
Page items to submit : item1,item2 , item3
This Dynamic action is working fine because I am able to see the values on screen and also i am able insert data using  "Automatic Row Processing" process.
How? Using a DA or page process? Provide full details, including the PL/SQL code.
We are using Page process (PL/SQL anonymous block) on submit of page to insert data  into table.
BEGIN
insert into tbl1 (col1,col2,col3) values (:item1,:item2,:item3);
insert into tbl1 (col1,col2,col3) values (V('item1'),V('item2'),V('item3'));
COMMIT;
END;
Data is getting inserted but with col2 and col3 as nulls.
Please let me know if you need any more information.

Similar Messages

  • Setting item value for child tab

    My application has pages with 2-level tabs.
    I can set item values using the "Set these items" and "With these values" fields in "Tab Target" section in the application builder page of the parent tab.
    However, I cannot find the corresponding fields for the child tab application builder page. ie. certain page items are being set when the child tab is pressed.
    Creating page process to set the items doesn't work for me, because I only want the items to be set if the requested page to the current page is not the same one.

    Ken,
    Use an on-submit before-computations process that fires conditionally based on the request, e.g., only if the request is one of a specified list of tab names.
    Scott

  • Can't Set Item Value After Calling Stored Procedure

    In a forms6i program unit, I call a stored procedure. The stored procedure executes successfully. Then I set the value of a date item on a data block to sysdate.
    When I run the form and execute the program unit the stored procedure executes successfully, but then the program unit gives me a No Data Found error when I set the value of the date item on the block. The value of the date item never changes. However, if I comment out the call to the stored procedure, the date item changes to sysdate and there is no error message generated.
    Just to be sure, I moved the logic to set the date item value to a separate button on the form. Then I re-ran the program unit. The stored procedure executed successfully. Then I clicked the button to set the value of the date field on the block, which gave me the same no data found error.
    Then I commented out the call in the program unit and re-ran the test. The program unit executed. Then I clicked the button to set the date value in the block and it was set to sysdate with no errors.
    Why can I not set the date item after running a stored procedure?

    Seems like a MSDTC config issue
    See if this helps
    http://support.microsoft.com/kb/2027550/en-us
    http://zarez.net/?p=1469
    http://danieladeniji.wordpress.com/2013/03/06/microsoft-sql-server-linked-server-error-the-partner-transaction-manager-has-disabled-its-support-for-remotenetw/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Set item value at other page via URL-redirect

    Hi, I have a button and I want to open a new window with it using an url-target.
    </br>
    </br>
    javascript:window.open ('f?p=&APP_ID.:143:&SESSION.::NO:143:P143_KDT_ID,P143_MESSAGE:&P140_KDT_ID.,&P140_MESSAGE.') </br>
    </br>
    When I use branching I get an error that there is no page to branch to. I don't understand why. As a workaround I use an url-redirect when the button is pressed, but I'm stuck on getting the current item value into the target page. I tried using $v('P140_MESSAGE') but I can't get the url valid.

    Jacob,
    The problem was that when the HTML for the button is rendered, the value of P1_ITEM from session state was "glued in" to the generated URL at that time. If you then entered a value for the iterm, even though your onChange AJAX technique changed the value in session state it was too late to change the already generated HTML for the button, specifically the URL target for the button.
    I created a Set Item2 button on your page with this for the URL attribute:
    javascript:window.open('f?p=&APP_ID.:2:&SESSION.::NO::P2_ITEM:' + document.getElementById('P1_ITEM').value);
    Let me know if that does what you need.
    There is another problem and I don't know the cause. When you click the button, it opens the new window properly but leaves the original page in an error state of some kind. I could not reproduce this in my application using the same js, so I'll be interested in how you solve that.
    Scott

  • How to set item values without using fields in branch's ACTION block?

    Okay, I will try to say this in a easy way so it is not weird.
    I have created a button, SAVE, that has a Branch of branch type: Branch To Function Returning A Page. This is my code for the branch:
    if :P2008_NAP_SUPPORTING_MATERIALS = 'Yes' then
    return '2092';
    else
    return '2040';
    end if;
    The code for this type of branch is stored in the ACTION block of the Branch page. The ACTION block for a Branch of branch type: Branch To Function Returning A Page is different than the ACTION block for a Branch of branch type: Branch To Page Or URL.
    I need to set some item values with some specific values, which I can do with a branch type: Branch To Page Or URL. This is not possible with the branch type: Branch To Function Returning A Page. The ACTION block is totally different.
    How can I set some values on say Page 2040 from Page 2008 without using fields in the branch's ACTION block?
    Thank you in advance,
    Maggie

    Andy and Scott,
    I love seeing different perspectives in solving problems, it opens my eyes to new ways of looking at/using the tools (reserved words and 'Function returning a Page', etc.).
    One of my pet peeves has been that on branches I was limited to only 10 variables to be passed (I know, who would want more - but there was an instance where I had to pass more), and an even more frustrating time when using report Column Linking, which limits me to 3 variables.
    At least with the Branch linking I can use your suggestion Andy and add the variable setting statements into the function. I am assuming of course (and I should be able to) that I will be able to set more that 10 variables in a IF condition prior to the RETURN statement. This method will be much more understandable, for me, when looking through the branch at a later time to see what is happening, than an URL link where all the variable are strung out 'in a line' so to speak.
    I will still need to use URL Target branching on Links contained within a Column Attribute when I need to pass more than 3 variables, of which I have several places where I do this.
    Thomas

  • Set default value based on sql query?

    Hi,
    is it possible to set default value of an BC entity attribute by using sql expression?
    Eg. "select max(x)+1 from y where userid=?"
    Rgs
    Jernej

    Jernej,
    Yes, you can do this. Edit your entity object attribute, and in the Edit Attribute dialog select "Derived from SQL Expression". Then you can enter your expression in the Expression text box.
    Blaise

  • Set item value from application level item

    Hello,
    I'm using Apex 2.2.1.00.04. I've modified the Page "No Tabs" template so that I can have my own Form (which is submitted to an outside website). On this form, I create some hidden items:
    <form name="frmEPay" method="POST" action="some_website">
    <input type="hidden" id="i1" name="userId" value=&G_ID. />
    <input type="hidden" id="i11" name="timestamp" value="" />
    <input type="hidden" id="i12" name="hash" value="" />
    On this apex page, I have a javascript function which is called in the onload (basically, the ApEx webpage displays and then is redirected). Here's a snippet of that function:
    var appProc = new htmldb_Get(null, html_GetElement('pFlowId').value,'APPLICATION_PROCESS=PrepEPay',0);
    appProc.get();
    appProc = null;
    document.getElementById('i11').value = "&G_ECOM_TIMESTAMP.";
    document.getElementById('i12').value = "&G_HASH.";
    document.frm_infiNET.submit();
    As you can see, the function calls an application level On Demand process (PrepEPay). That process sets the values of the application level items G_ECOM_TIMESTAMP and G_HASH. After those App level items have their values, I want to take those values and apply them to the hidden items on my custom form. Unfortunately, it doesn't work how I have things currently. I've verified that the On Demand process is running(by viewing the Session report on the page). So my problem seems to be this: 1. Retrieving the values from the Apex application level items
    2. Setting those values to the values of my hidden items (on my custom form)
    I think the biggest reason why I'm having difficulties is because I have to do a lot of this in the template, since that is the only way to have a separate Form. Maybe my problem is that I don't understand how to reference the Apex application level item value from a different form?
    Thanks,
    Marty

    Marty,
    You are describing this as if you expect the substitution within "&G_ECOM_TIMESTAMP." and the other one to take place in some kind of lexical order, e.g., from the top to the bottom of the HTML. The replacements happen in the engine, before anything is sent to the page. Then the browser interprets language constructs such as javascript calls which in your case includes an ajax invocation of a server-side application process.
    You need to re-think the machinery here.
    Scott

  • Pass Page 0 TextBox item value to populate SQL Report on another page.

    Hi,
    I have created one textbox and one Template Based Button on page 0.
    And i have coded (On Button Display Attributes)
    I want to pass Page 0 TextBox value into the SQL Report on Page100.
    For this i planed to pass the value entered on Page 0 (TextBox) by coping the entered value into clipboard and assign this value to a hidden textbox(P100_SEARCH), which is on page 100. so that i can pass this value to the SQL Report.
    I have coded (On Button Display Attributes) in Page 0.
    onclick="javascript:window.clipboardData.setData('Text', document.getElementById('P0_SEARCH').value);redirect('f?p=229:100:&APP_SESSION.::NO:::');"
    So its copying the entered value into clipboard and redirecting to page 100.
    But here i am facing the problem
    how to assign the save clipboard value into Hidden TextBox(P100_SEARCH) on page 100, so that data is
    populated on page100 according to the enterd value from page 0.
    Please help me . Its urgent.
    Thanks
    --PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    I think it is the button templates that are causing the problem as they a normally designed to submit the page and you need to do a redirect.
    I would suggest doing the following:
    1 - Go to Shared Components, Templates
    2 - Click Create
    3 - Select Button
    4 - Select "As a Copy of an Existing Template"
    5 - Click Next until you get to a list of existing button templates
    6 - Change the name of the "Copy of ..." for the template that you are using (to something like "Button for javascript") and select Yes in Copy?
    7 - Click Copy Button Template
    8 - When it has been created, you are returned to the templates list - click the edit link for your new button
    9 - Update the "Template" setting. How you change this depends on your Theme and the Button Template you are using. But, as an example, in Theme 19 and using the Button button template, change:
    &lt;input onclick="#LINK#" class="t19Button" value="#LABEL#" type="button" /&gt;to:
    &lt;input #BUTTON_ATTRIBUTES# class="t19Button" value="#LABEL#" type="button" /&gt;So, the onclick="#LINK#" setting is removed and the #BUTTON_ATTRIBUTES# one is added in instead.
    Now, go back to Page 0 and change your button to use this new template.
    Change the Button Attributes setting to:
    href="javascript:void(0);" onclick="javascript:redirect('f?p=&APP_ID.:100:&SESSION.::NO::P100_SEARCH:' + $v('P0_SEARCH'));"and Apply Changes
    Now try your page again
    Andy

  • Set item value

    Hi,
    I need to set the item value to a default value. The current form is defaulting to sysdate
    For a release sales order form i want to set the default value for the item "scheduled ship date from" sysdate to sysdate+1. I tried to do this customization using custom.pll but not able to succeed it.
    I tried to set the date in this way
    SET_ITEM_PROPERTY('RELEASE.FROM_SCHEDULED_SHIP_DATE',INITIAL_VALUE,SYSDATE+1);
    I am not able to succed in this way. Can anyone kindly respond me immediately
    This is very high priority issue for me.

    Anuj,
    Thank you so much for your prompt response.
    When i am using the query in custom.pll i am getting bad bind variable
    select sysdate+1
         INTO :RELEASE.FROM_SCHEDULED_SHIP_DATE
         from dual;
    i tried in other way like
    select sysdate+1
         INTO Name_in('RELEASE.FROM_SCHEDULED_SHIP_DATE'
         from dual;
    this way is also not working. Can i set the date value using set_item_property. i searched all the forums and help in form builder but didnt find the right answer. plz help me..
    Thank you

  • How to programmatically set item value

    I created button ‘Accept ALL’ within region to set all values of field to ‘Y’ when clicked on and another button ‘Reject ALL’ to set all field values to ‘N’. Values are intialy derived from
    Region Source (partial query only):
    ...DECODE(eval_contract_accepted_ind,'Y',htmldb_item.text(6,'YES',3,3),'N',htmldb_item.text(6,'NO',3,3),NULL,htmldb_item.select_list(6,'Y','Yes;Y,No;N')) accepted,...
    So values in that field are populated conditionally from static lov Yes;Y,No:N
    I created two processes and allocated them to the relevant button, but non of the values get set.
    ACCEPT_ALL process:
    for i in 1..htmldb_application.g_f01.count
    loop
    if htmldb_application.g_f06(i) not in ('YES','NO') then
    htmldb_application.g_f06(i) := 'Y';
    end if;
    end loop;
    REJECT_ALL process:
    for i in 1..htmldb_application.g_f01.count
    loop
    if htmldb_application.g_f06(i) not in ('YES','NO') then
    htmldb_application.g_f06(i) := 'N';
    end if;
    end loop;

    Hi,
    According to your post, my understanding is that you want to set the value to current Page layout property.
    To get current page property, you can refer to:
    How to get current Pages details in SharePoint2010 publishing site
    Get Content Field Value in Article Page
    To get current page layout property, you can refer to:
    PublishingPage.Layout Property (Microsoft.SharePoint.Publishing)
    PageLayout.Title Property (Microsoft.SharePoint.Publishing)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Setting default value using pl/sql

    I am having trouble writing the correct syntax for either a pl/sql expression or function on the default value section for a checkbox item. I share the same form for showing data in edit mode and creating new records. When the instance is a new record, I want an item called P12_ACTIVE to be set to Y (yes).
    I have tried several variations like:
    begin
    select distinct 'Y'
    into :P12_ACTIVE
    from VMS_PROSPECTING_ITEMS
    where order_id != :P12_ORDER_ID;
    end;
    -OR-
    declare defaultvalue varchar2(10);
    begin
    if not exists (select *
    from VMS_PROSPECTING_ITEMS
    where order_id = :P12_ORDER_ID) then
    defaultvalue := 'Y' ;
    end if;
    return defaultvalue ;
    end;
    -OR-
    as a pl/sql expression....
    select distinct 'Y'
    from VMS_PROSPECTING_ITEMS
    where order_id != :P12_ORDER_ID;
    end;
    Dawn

    This is my LOV definition for the item:
    STATIC: ;Y
    If I put Y as the default value, then the check box is always marked, even when the record is one that was edited; therefore potentially changing the active status incorrectly. I would like one of my examples to work right. My second example throws this error:
    Error ERR-9131 Error in PLSQL function body for item default code, item=P12_ACTIVE
    ORA-06550: line 3, column 8: PLS-00204: function or pseudo-column 'EXISTS' may be used inside a SQL statement only ORA-06550: line 3, column 1: PL/SQL: Statement ignored.

  • Setting items values programmatically

    Hello, I'd like to set some items to some values
    contained in the DB. The trick is that the item names
    are also specified in the DB.
    For example I could have a table with 2 columns:
    item_name | item_value
    VAR_A | XYZ
    VAR_B | ABC
    I'd like to set :VAR_A to 'XYZ' and :VAR_B to 'ABC'.
    I tried DBMS_SQL, V() and NV() to no avail.
    Thanks for your help.

    stinnux,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • How to set item values when redirecting to the same page.

    I just created a redirect button that I want to redirect to the same page and set the 2 page items on the page to the same value they had before the redirect.
    But I can't write:
    Set These Items: P1_Permit_Number,P1_Fishing_Year
    With These Values: &P1_Permit_Number.,&P1_Fishing_Year.
    Because there are no values in the session state, since a submit has not been done.
    So how do I do this?
    I know how to get the values stored in the items, e.g., $v('P1_PERMIT_NUMBER')
    but where do I place that command? It's not allowed under "With These Values"
    And I don't really want to make this a submit button and create a process that says:
    P1_PERMIT_NUMBER := $v('P1_PERMIT_NUMBER') because that would complicate the page too much -- I already have other processes and branches on the pages whose conditions would have to be modified so that they don't run during this scenario.
    Thanks.

    Thanks Gary and Andy. I rewrote the function according to above instructions:
    function redirectToURL()
    var permitNumber = document.getElementById('P1_Permit_Number');
    var fishingYear = document.getElementById('P1_Fishing_Year');
    var url = 'f?p=&APP_ID.:1:&APP_SESSION.::::P1_Permit_Number,P1_Fishing_Year:' + permitNumber +',' + fishingYear;
    window.location.href = url;
    But when I entered a value for permit number and fishing year and redirected, the word "null" appeared in the Permit page item, instead of the permit number that I had entered.
    Remember that I am not submitting here. So if the syntax you showed me, i.e. getElementById('P1_Permit_Number'), searches for the item's session state, then it will be wrong, since there is no session state value for the items at this point. Perhaps that is the reason I got the null?
    If so, what can I do?

  • Accessing html field value from pl/sql code, in the same package

    hi friends,
    my pl/sql web application is working fine. but now i need a small requirment.
    ie, basicaly i need to access the user entered value of an element in html based form from pl/sql code, which is developed using pl/sql toolkit.
    Here is the scenario:-
    User entered a value in field1, then navigate to field2, and click a button for list of values,
    when he clicks the button, internaly it is opening a cursor, where i want to pass field1's value to my cursor as a parameter. So in my pls/sql code , i want to access the value of field1. If you know, please help.
    see the snippet of code.
    htp.p('
    function f1()
    if (parseInt(learnIdx) ==1 )
    for i in dev_Need('1')/*here i want to pass html form element value as a parameter */
    loop
    htp.p('content += "<option value='''||a.version_name||'''>'||a.version_name
    ||'</option>''"; ');
    end loop;
    thanks in advance.
    Zameer.N.A

    Hi,
    Here's my suggestion
    If you wanna access the dll check out "external procedures", you can search it everywhere in OTN.
    However it's easier to use Heterogenous Services to connect database with other sources.
    Check out http://asktom.oracle.com/pls/ask/f?p=4950:8:13454621522426176943::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:4406709207206,
    Tak Tang answer on May, 25, 2004 rules!

  • Accessing Excel cell value from PL/SQL

    I Would like to part my question into 2 sections. Both are related to PL/SQL
    (Version 8.x or 9.x) COM automation
    A). I have a spreadsheet with some values in the following cell address
    File Name : Employee.xls
    Worksheet Name : Emp_Detail (There are other spreadsheets)
    Cell Address
    Employee id : C50
    Name : Z10
    Address : X10
    I will have to grab the follwing cell values and insert into the staging table
    usinf PL/SQL. I have read some of your article realting to OWS package which
    retieves the whole excel spread sheet.
    B). I have a Activex control developed in VB6.0 and registered. Inside the dll there is a class
    AccessXLS.cls, which uses the objects/functions relating
    to the Excel spreadsheet.
    I would like to know is there any COM automation method
    to activate the dll from my PL/SQL.
    Awaiting for your reply

    Hi,
    Here's my suggestion
    If you wanna access the dll check out "external procedures", you can search it everywhere in OTN.
    However it's easier to use Heterogenous Services to connect database with other sources.
    Check out http://asktom.oracle.com/pls/ask/f?p=4950:8:13454621522426176943::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:4406709207206,
    Tak Tang answer on May, 25, 2004 rules!

Maybe you are looking for

  • Error while creating TO w.r.t. Inbound delivery

    Dear All, As there is a requirement to track the pallet, a storage location with Handling unit management activated in it. The storage unit management  is also activated in the warehouse  and storage type. When initial entry of stock was uploaded in

  • Integration Component error: 403

    Hello, I recently installed SAP B1 8.8 PL18 (on  a 64bit machine), and the standalone B1 integration component. I followed the installation guide perfectly, and still receive an error whenever I try to use my dashboards, or open the integration frame

  • Xcode/AppleScript App - bring window to front

    i have built an xcode/applescript wrapper application which executes a unix shell script. while the shell script is running (downloading + installing stuff, takes several minutes), the wrapper application is displaying an animated NSProgressIndicator

  • Images and video's

    Hey hey my question is. is there an other way to import my photo's and video's to my computer. cous Mailing and so doesn't work for me...... I can't find somthing about this at the site ^^. Please and thx Tmmk

  • What's With Safari?

    Ever since upgrading to Leopard, Safari is crashing about every ten minutes or so. There doesn't seem to be any specific thing I'm doing when this happens, in fact, sometimes I just have Safari open to a web page and I'm reading e-mail and it crashes