SQL row fetch based on other page items

Hi ,
I am new to Application Express.
Please guide me .
I have a table with three keys.
Now I am displaying records in ther report part(page 33) of forms with report.
I have provided navigation on one of the primary keys.
One clicking on the key value it takes me to the form page(page 34) where the details of that speicific record are displayed. The page fetches teh details on the basis of automated row fetch using two primary keys as the condition for selecting the specific record from table.
Now since I want the record to be fetched on th basis of three primary keys instead of two(limitation) of Automated Row fetch . I had to create a sql process.
I wrote the following query but its not being able to fetch any data.
Displays no data found on navigating from the report page (33) to form page(34).
There seems to be something wrong with the query.
select
PROGRAM,SUB_PROG,DELIVERABLE,SOURCE,REC_COUNT,CREATE_BY,CREATE_DATE,
LAST_UPDATE_BY,LAST_UPDATE_DATE,BTORDIRECTOR,AOPTERRITORY,
FIELDSERVRGM
INTO
:P34_PROGRAM,:P34_SUB_PROG,:P34_DELIVERABLE,:P34_SOURCE,:P34_REC_COUNT,:P34_CREATE_BY,:P34_CREATE_DATE,:P34_LAST_UPDATE_BY,:P34_LAST_UPDATE_DATE,:P34_BTORDIRECTOR,:P34_AOPTERRITORY,:P34_FIELDSERVRGM
FROM CAP_NIMS_MANUAL
WHERE
PROGRAM=(:P34_PROGRAM) and
SUB_PROG=(:P34_SUB_PROG) AND
DELIVERABLE=(:P34_DELIVERABLE)AND
REC_COUNT=(:P34_REC_COUNT);

Hi,
Thanks for your suggestion.
all the four fields have value.
I have fixed the process point as new instance
while the query is as follows.
Now it displays the value of only the first three fields which are primary keys while it is not being able to fetch the value of other fields.
i.e Prog, Sub Prog, and Deliverable
select
REC_COUNT,CREATE_BY,CREATE_DATE,
LAST_UPDATE_BY,LAST_UPDATE_DATE,BTORDIRECTOR,AOPTERRITORY,
FIELDSERVRGM
INTO
:P34_REC_COUNT,:P34_CREATE_BY,:P34_CREATE_DATE,:P34_LAST_UPDATE_BY,:P34_LAST_UPDATE_DATE,:P34_BTORDIRECTOR,:P34_AOPTERRITORY,:P34_FIELDSERVRGM
FROM CAP_NIMS_MANUAL
WHERE
PROGRAM=(:P33_PROGRAM) and
SUB_PROG=(:P33_SUB_PROG) AND
DELIVERABLE=(:P33_DELIVERABLE) and
REC_COUNT=(:P33_REC_COUNT);

Similar Messages

  • Report row highlight based on a page item

    Is there a way to highlight a report row based on the value of a page item?
    In my case I have a report where the application user requests data in a detail report using a column link in the master report. This loads an id number from my report into a page item (say :P8_ID for example). If this item is null, I want the report rows to all render normally (nothing is selected or the detail report has been closed). If there is an id in that field then I want the row containing the information about that item to highlight (its column link has been clicked selected it to bring up a detail report).
    At first glance, this looks similar to Vikas solution (Change the Report row color when clicked but I am trying to make the connection between what has already been done and where I need to be.

    After looking back, I discovered my value was being set after the report rendered. When I re-organized my calculations and the rest, it worked.

  • Row fetching, session state, multi-page processing of 1 row - problems

    I'm building an application that's updating a couple of tables via an updateable view and an instead-of trigger. That portion of it works OK, EXCEPT for the problems that I'm having with the APEX end.
    I've got 3 pages; the first page reads the row in via the automated row fetch and has, say columns 1-20.
    Page 2 has, say, columns 20-40 and page 3 has the remainder.
    I have the row fetch set up conditionally so that it only executes the first time that page 1 is displayed. All the columns are set as Database Columns.
    It seems that if I fill in fields on page 1, move to page 2, and back to page 1, the contents of the fields on page 1 are destroyed unless I set their 'Source used' to 'Only when the current value in session state is null'.
    Furthermore, upon update (which is on page 3, via an automated row update), the only columns that get updated are those that exist on page 3. The column values from the other pages no longer exist.
    Does navigation to another page not retain the session-state of database-column items?
    Am I better off just writing my own processes to perform the updates?
    Any other suggestions?
    Frank

    Hello Frank,
    >>I have the row fetch set up conditionally so
    that it only executes the first time that page 1 is
    displayed …
    It seems that if I fill in fields on page 1, moveto page 2, and back to page 1, the contents of the
    fields on page 1 are destroyed unless I set their
    'Source used' to 'Only when the current value in
    session state is null'.
    It seems that the first sentence is not consistent
    with the second one. The only reason the values are
    destroyed, as you call it, is that the ARF is running
    again. What condition are you using on your ARF?
    In any case, the right way to deal with it is to
    change the source used to "Only …", as I understand
    you already did.
    Hi Arie,
    I set an item after the first ARF. I then have the ARF set to execute conditionally based on the presence of that item. (I also display a success message on the ARF, so I know that the ARF is only occurring once). I move to subsequent pages by submitting the current pages.
    >>Does navigation to another page not retain the
    session-state of database-column items?
    Navigating to another page does retain the session state values.
    It's depends on what you mean by navigating.
    Submitting the page set/update session state.
    Redirect without submitting the page will not
    set/update the session state.
    >>Furthermore, upon update (which is on page 3,
    via an automated row update), the only columns that
    get updated are those that exist on page 3. The
    column values from the other pages no longer
    exist.
    Automatic DML is working only with the current page
    items. You can't use it to insert/update other page
    items, even if they are in session state. However, in
    your case, it's not the Automatic DML performing the
    actual updates, but your triggers. Are your triggers
    relying on session state values?
    I think this statement 'Automatic DML is working only with the current page
    items.' answers my question. My trigger is working on session state values. It's an 'instead-of' trigger, so I was letting the automatic DML perform the 'update' on the view, while allowing the trigger to do the actual update of several tables that the view joins by referring to their :NEW. values in the trigger. Since the DML occurs on my last page, those were the only session state values that my trigger ultimately saw.
    >>Am I better off just writing my own processes to
    perform the updates?
    I believe the correct way is to submit the page and
    then branch to the next one. Submitting the page will
    save all your items in session state, and allow these
    items to be available for page 3 DML.
    Regards,
    Arie.I'm doing that already - all the values do appear to be in session sate, except only the items that are on the last page actually make it to the automatic DML update, which seems to agree with your previous statement.
    I suppose I could write my own process to perform the update, as the values are available in session state.
    Thanks,
    Frank

  • Automatic row fetch based on a select list

    db11gxe , apex 4.0 , firefox 24 ,
    hi all ,
    i want to do automatic row fetch when the value of a select list changes ?
    but first i should ofcourse create a tabular form to fetch the data into it , but what i want is ,if i fetch 2 rows then the report contains only two rows , if i fetch 3 , the report contains only 3
    , if i fetch nothing , the report has nothing ?
    thanks

    Assuming all your page items are on separate rows, under your Page Attributes Header and Footer section, add the below function under Header Text:
    <script>
    function f_toggleNM() {
       // if P2_ATTACHMENT_TYPE value is D, then show row holding P2_CUSTOM_NAME and P2_CUSTOM_MSG. Else hide them
       $f_Show_On_Value_Item_Row('P2_ATTACHMENT_TYPE', [ 'P2_CUSTOM_NAME', 'P2_CUSTOM_MSG' ], 'C');
       // if P2_ATTACHMENT_TYPE value is C, then show row holding P2_DEFAULT_NAME and P2_DEFAULT_MSG. Else hide them
       $f_Show_On_Value_Item_Row('P2_ATTACHMENT_TYPE', [ 'P2_DEFAULT_NAME', 'P2_DEFAULT_MSG' ], 'D');
    </script>Under Footer Text, add the below:
    <script>
    f_toggleNM();
    </script>And on the P2_ATTACHMENT_TYPE item, Element tab, HTML Form Element Attributes, add below:
    onchange="f_toggleNM();"Hope this helps. Thanks!
    JMcG

  • Before Header pl/sql process to assign values to page items

    How can i assign values to items on a page based on the data structure returned from a pl/sql procedure within the before header process? I am thinking of executing a pl/sql procedure based on a URL parameter value and then assign values to page items. Is this really possible using Apex 4.0.2? If yes, how can it be done?
    thanks
    Seetharaman

    The question isn't really clear. What kind of "data structure returned from a pl/sql procedure"? Please be much more specific.
    For a PL/SQL data structure such as record containing 2 elements (<tt>x</tt> and <tt>y</tt>) returned as an out parameter from a procedure to be assigned to 2 page items <tt>p1_x</tt> and <tt>p1_y</tt>, all that's required in the Before Header process is something like
    declare
      l_rec rec_type;
    begin
      the_proc(..., p_out => l_rec, ...);
      :p1_x := l_rec.x;
      :p1_y := l_rec.y;
    end;

  • 2 automatic row fetches based on the same variable

    I have a select list with a submit that contains all products that are currently stored in the database. The select list reloads the page and passes the value of the product id selected in the list to P3_PRODUCT_ID.
    I then use this value (P3_PRODUCT_ID) for two process under page rendering. One to fetch the associated fields in the Product table for the P3_Product_Id as this is the primary key and One to fetch the associated filed's in the Nutrion table for the P3_product_Id.
    This works fine if i only do one fetch process but if i try to both of the process i get
    ORA-01403: no data found
    Error ORA-01403: no data found
    OK
    which seems strange to me as the processes work fine individually.
    Anyone have any ideas or point me in the way of some reading? Is this even possible to use two automatic row fetches or do i need to write my own PL\SQL block?
    Many Thanks
    Daniel Stead
    Message was edited by:
    Dan Stead

    Only one ARF per page is supported.
    Scott

  • IR Report based off of page item value

    Hey all,
    I want to create an IRR region and have the report update based off of a a page item.
    The page item will be a drop down of the tables I want to show, so something like:
    Select * from '||v('P1_TABLES')
    This will work with the normal report but not with the IRR. Is the syntax incorrect?
    Help is appreciated!
    Edited by: Ben C on Feb 23, 2012 6:42 AM

    Zooid,
    but always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always
    use bind variables !!!!
    Regards,
    Richard
    blog: http://blog.warp11.nl
    twitter: @rhjmartens
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Two 'Automated Row Fetch'-processes at one page

    All,
    I have a page with several fields (P24_xxx_Reg1 & P24_xxx_Reg2) in two regions.
    For every region I have an ‘Automated Row Fetch’-process, because they base on different tables.
    The second process sets the field values of region 1 to null,
    even all is different: fieldnames, sources, regions, processes, etc.
    Any help appreciated,
    thanks in advance
    lucio

    Create a view on a table you want to update if you have more than two key values.
    However, the automated row fetch does support two key values.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • JQuery "setting all items to READONLY based on a page item" not working

    I am attempting to use jQuery to set all input fields to "readonly" if the question is in "locked" status (i.e., if P2_QUESTION_LOCKED page item is set to yes ("Y")). The following is the code that I placed in the page attributes (in the javascript section):
    if ($x('P2_QUESTION_LOCKED') )
       if ($x('P2_QUESTION_LOCKED') == 'Y')
           $(document).ready(
           function() {    $('input').attr('readonly','readonly'); });
       }It is not working. All input fields are available for input. I used Firefox 1.6 and Firebug and I have no errors. What am I missing?
    An example is set up in APEX.ORACLE.COM:
    Workspace: RGWORK
    Application: Financial Disclosure (Application 45806)
    User Name: TESTER
    Password: test123
    Run the application, and click on 'Update Current Year's' from the list.
    Robert
    http://apexjscss.blogspot.com
    PLEASE IGNORE THIS THREAD. A THREAD IS ALREADY OPEN. HAD A HICCUP WITH THE INTERNET.
    Robert
    Edited by: sect55 on Dec 12, 2010 3:11 PM

    Hi Robert,
    I have changed your code to
    if ($x('P2_QUESTION_LOCKED') )
       if ($v('P2_QUESTION_LOCKED') === 'Y')
            $('input').attr('readonly','readonly');
       }Especially the
    $x('P2_QUESTION_LOCKED') == 'Y'to
    $v('P2_QUESTION_LOCKED') === 'Y'I have also moved your code into "Execute when Page Loads".
    Couldn't try the code because I was not able to login, but I think the code should work.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Close page using javscript and set other page item values

    hy all, i'm trying to create a sort of pop up page.. i open this page (lets say 100) from another page(lets 101).. the page number 100 is opened as a pop up window. it is a report page, so i'd like by clciking the value of one culomn set some values for the item of page101 and close it..
    i'm trying to do it with javscript, but it doesnt work..
    could u maybe help me.. thanks

    Take a look at the HowTo on creating popup pages:
    Build Custom Popup Pages in Oracle Application Express<br><br>
    After completing this How-To, you should understand:<br>
    <br>
    * How to make a custom popup window page in an HTML DB application<br>
    * Passing values from a form page to a popup window.<br>
    * Passing values back from a popup window to the opening form page.

  • Set page item when going to single row view

    Is there a possibility to set page items when going to single row view in an interactive report?
    APEX 4.1
    Edited by: Niels Delaere on Nov 21, 2011 4:59 AM

    Thank you for your response, can you (or anyone else) give me a little more help? I can't seem to figure out how to get this working. The thing you are doing in your demo application is exactly what I want to do. Take two values of a certain row and set them in page items Where after in single row view users can see 3 additional regions with additional information based on these values.

  • How to fetch the tabular form column value into page items

    Hi,
    I have created tabular form. I have set LOV for one column. Here my requirement is when i select the value from lov then it will fetch that value into page item.
    can any help?
    I am using apex 4.1
    Thanks
    vijay

    It's not so easy to make a dynamic action on a tabular form.
    The best thing you can do is to use the javascript API from APEX: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm
    So if you have a tabular form then open your item and make it a column link.
    In the link location select URL.
    Your URL would be something like this
    javascript:$s('P1_PAGE_ITEM', #COLUMN_ID#);doSubmit('COLUMN_ID');The doSubmit is not required but if you don't submit your page then the server would never know about your page item.
    Off course it is possible to submit at a later point. For example you can just use the $s to set the value off an item and afterwards create a button that would submit your page.
    Be aware that if you just set the value off your page item and just link to an other page without submitting or without branching that other page would never know about your page item.
    If you want the server to know the value off a page item you need to submit it's value to the server. The easiest way is just to do the doSubmit() call after you have set your value.
    Hope this helps,
    Regards
    Nico

  • Enhancement Request : Subscriptions where IR uses Page Items.

    I'd like to request an Enhancement.
    I'd like report subscriptions to keep track of the current values of any page items in the sql statement when the subscription is stored.
    Currently any Interactive Reports that use page items run fine interactively, but subscriptions fail due to the page items having no values.

    Oh ok I see what you're trying to do but that's not what I meant.
    1. If your IR filters based on a page item and is a subscribable report, you have no choice but to work a NVL (or some other means) in there in order to make a true condition when the page item is null or nonexistent in order for the report to work at all during subscription.
    2. If you never want the user to be able to query all rows in the application (that is, force them to enter something in the page item), you'll need a not-null validation on the page so when they submit their page item change that it validates not-null.
    3. Use the filter in the IR (but NOT referencing a page item) such that the user can save/subscribe to an IR with the desired filter such that they get the properly-filtered named IR.
    Does that make sense?

  • Auto Row Fetch (After upgrade to 4.0.1)

    All,
    I have recently migrated an application from 3.2.0 to 4.0.1 and all seems fine apart from my Automatic row fetch processess on every page have stopped working. They have not been changed in anyway from old version to new.
    Fire: On Load After header
    Error: ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    Unable to fetch row.
    The page loads first time but then when clicking an edit link for a report row I receive the above error.
    I have tried:
    1. Disabling the row fetch to make sure it is that failing
    2. Deleting it and recreating
    Any helps is greatly received.
    Regards

    Hi Patrick,
    I have run the advisor and see no errors. Ther is one warning about a target item not existing on target page but this is believe is unrelated.
    Slight change of problem after some more investigation. Sorry I have mislead you.
    This problem is not realated to me updating to the new version as the problem actually existed on the app in the old version I just had not check throughly enough.
    I am trying to fetch data over a dblink and it appears that this is causing the issue. I moved the refrenced table to the local database and the fetch works.
    My question should have been:
    How can I fetch row data to the form over the dblink?
    Thanks for you response
    Nick

  • Automated Row Fetch binding

    Hi Experts,
    Apex 4.1
    This is what i'm trying to do.
    I have number of fields in a form.
    Value for the Fields are fetched from two different tables using Automated Row Fetch.
    When the page loads only one ARF process would run based on a flag value in the application item and only those fields specific to that ARF should be populated.
    what i have noticed is when one ARF executed apex tries to bind all the fields on the form which have source type as Db column.
    in my case when it tries to bind a field which is basically populated by second ARF. it throws error message.
    What i what t know is,
    When we have multiple ARF on a page, is there any way to specifiy.. these fields are only populated by this ARF ?
    Really appreciate if someone can assisit me on this.
    Thanks
    T.kurubaran
    Edited by: Apex-Ape on Mar 29, 2012 1:12 AM
    Edited by: Apex-Ape on Mar 29, 2012 1:13 AM

    Apex-Ape wrote:
    what i have noticed is when one ARF executed apex tries to bind all the fields on the form which have source type as Db column. This is the expected behaviour of ARF processes.
    When we have multiple ARF on a page, is there any way to specifiy.. these fields are only populated by this ARF ?No.
    You should create custom row-fetch process to achieve this.

Maybe you are looking for