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
-------------------------------------------------------------------

Similar Messages

  • How to trigger the automated row fetch process and open modal window by javascript api?

    Hi,
    I would like to click the one row of column of IR report, to open the modal window of current page.  <----------------it is ok. I can use "javascript:openModal('windowID')"  to do it.
    There is one form in this modal window, Meanwhile, I would like to pass column data to this form.    <--------------------- it is ok also. I can use " $s('P7_ID','column_value');" to do it.
    But I don't know how to trigger the "automated row fetch" process of this form to retrieve other field's value in this form.   
    I tried to use following 2 ways. But failed.
    First method:
    add one ajax process of "automated row fetch" in "page processing" block, named "get_fetch_data"
    when click IR column , call "openModal", and call  "apex.server.process ( "get_fetch_data", {}, { success: function( pData ) { }  } );"  , I tried to call above ajax process to refresh form. It is failed.
    Second method:
    add one process of  "automated row fetch" in "page rendering" block, named "get_fetch_data"
    when click IR column, call javascript api "apex.submit" to submit current page , then call "openModal".
    such as :  javascript:apex.submit({request:'MODIFY',set:{'P7_ID': #ID#}}); openModal('trade');
    But it is failed also. the modal page is showed firstly. then page refresh. but modal window will not open again.
    I am not sure if my thinking is right. Could you please provide any suggestion?
    Thanks in advance,
    Ping

    Hi Ping,
    You can try to set the session state of your modal page's primary key before opening the modal page. Use one dynamic action (on click of IR row) with two true actions. First one to set session state of modal page pk, second on to open modal page.
    Or you can add the modal page url as link in your report by extending your query:
    select ...
    ,         apex_util.prepare_url( 'f?p='||:APP_ID||':7:'||:APP_SESSION||'::'||:DEBUG||':7:P7_ID'||COLUMN_VALUE ) as link
    from ...
    This will give you the url of the modal page, with set primary key.
    Regards,
    Vincent Deelen
    http://vincentdeelen.blogspot.com

  • How to query on a single row form using only one page

    Hi APEX experts, I am just a beginner in apex and I face several problems on development. Despite that the forum helps me a lot and your answers to other people are valuable , I have stacked into something. Could you please someone tell me : if there is a way to define a single row form page based on table in which I could query and update without using a tabular page (to call the single row form). I want only to use only one page. Does APEX has this functionality? Thank you very much?

    I haven't tried it, but I am going to guess that yes it's possible (or if I were going to do this, this is what I'd try and I suspect it will work).
    If you take a moment and step back and look at what the wizard does when building a "form on a table with report", all it does is build two pages with page 1 (report overview with drill-down Edit button or link usually) calling page 2 (form) and setting the PK field on the page 2 form with an automated row fetch process and built-in DML processes. It's not that hard.
    Page 2 really doesn't care what the calling page was in order to query a single row; it just cares that ANY caller sets the primary key value for the ARF process to fetch a row. So I would just make page 2 call itself. This is what I'd do (and you might have to fine-tune little things that I might not have forseen but I think this will work).
    For the sake of example, let's say our table is PARTS and in it is a PART_ID, PART_NUMBER, PART_DESCRIPTION, PART_COST, etc. Assume PART_ID is the primary key and sequentially assigned by the DB in a trigger and is functionally meaningless to the user and is for PK purposes only. Let's assume PART_NUMBER is a unique key (although not the PK) by which the user will "know" a unique row (since the PK of PART_ID is more internal and not meaningful to the user). Assume PART_DESCRIPTION, PART_COST, etc. are just attributes.
    1. Use the wizard and build a "form on a table with report". This is just to get the handy dandy ARF process and DML processes, validations, etc. all generated for you. Let's assume the report page is Page 1 and the form is Page 2.
    2. When done, delete the report page entirely (so delete page 1).
    3. Edit the form page (page 2) and change any branch references from the nonexistent page 1 to now be page 2.
    Now here's the part where something has to set the internal P2_PART_ID field when page 2 is run. So why not set it from itself from something the user will uniquely enter?
    4. Create a P2_PART_NUMBER_FETCH item (text item is fine or if you want a LOV or whatever that's good too....whatever works. For clarity, you might even want to create a separate "search" or "query" region separate and above your existing form region to set this field apart visually so users know it's a search field. Source for this field should be "only when current value in session state is null".
    5. Created some sort of "GO" button to go along with the P2_PART_NUMBER_FETCH field.
    6. Make sure none of your existing post-submit processes fire when GO is pressed (edit all of the computations and validations and processes and ensure that they have conditions such that they do not fire when the submit value is "GO", so like a PL/SQL expression and set to v('REQUEST')<> 'GO').
    7. Add a new validation to your page that only fires when GO is pressed. Have it validate only when GO is pressed. Have it validate that P2_PART_NUMBER_FETCH is not null.
    8. Add a new PL/SQL process to your post-submit processing that only fires when GO is pressed. Have it look up to the database based on P2_PART_NUMBER_FETCH and get the PART_ID that corresponds to the part number the user entered and set the part number, something like this (even better for style and reusability if you embed this in a DB package function and call it):
    SELECT part_id
    INTO :P2_PART_ID
    FROM PARTS
    WHERE PART_NUMBER = :P2_PART_NUMBER_FETCH;
    9. Not sure if the branches that were generated will suffice for this (might need to add a new one...review what you have and see) but the bottom line is that the page should branch to itself (page 2) and not clear the cache.
    10. When the page repaints, since :P2_PART_ID is now populated in session state (again, page 2 should not care how it got populated...only should care that it did get populated by anything (including itself)), the automated row fetch (ARF) should fire and query up the row from the database for editing.

  • 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.

  • Set memory cache - automated row fetch

    I would like to know more about the difference between
    Set Memory Cache On Display and
    Set Memory Cache On Fetch
    option, given in the Automated Row Fetch process.
    I noticed that it makes a difference in some cases - especially where I have a master-detail relation and need to perform multiple drill down:
    e.g. the report shows what was expected but export to .csv returns no rows. After switching from the default 'Set Memory Cache On Fetch' to 'Set Memory Cache On Display' everything works fine.
    Where could I find something about this option?
    Denes Kubicek

    Denes - I'd need to see an example to explain it. It is not the behavior I would expect. Can you create a simple test case on htmldb.oracle.com? Please post the workspace name and app/page ID when you have it.
    A bit more info: when the DML Fetch Mode is set to 'Set Memory Cache On Display', references to items sourced by the fetch, say &P1_ENAME., will not return the value that would be displayed in the form item P1_ENAME until after the code that emits P1_ENAME executes. So if your page had a before-header DML Fetch process that fetched a value for P1_ENAME (from EMP) and region A that displayed conditionally based on P1_ENAME = 'SMITH' and then region B containing the form item P1_ENAME and then region C that displayed conditionally based on P1_ENAME = 'JONES', the condition on region A would not see the fetched value of P1_ENAME but the condition on region C would see the value. However, if you set 'DML Fetch Mode to 'Set Memory Cache On Fetch', the condition in region A would see the fetched value.
    When you have a csv link or chart region that references a value from session state, that value must have been committed to session state (which happens when you run a computation, do an explicit assignment or "select into" a bind variable associated with a page or application item, or when you submit a form) in order for the csv or chart page to access the current value.
    Scott

  • Table and Primary Key Case Sensitive in Automated Row Fetch

    Why are the table and primary key fields case sensitive in the Automated Row Fetch process? I'm debugging an error in this process and I'm not sure what the case should be.

    Russ - It's a defect of sorts. Use upper case in the process definition. I don't think these processes will work with tables or columns whose names are not known to the database as upper-case values, i.e., defined using double-quoted non-upper case.
    Scott

  • 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

  • Automated row fetch returns more than one row

    Greetings All,
    Does anyone know of a way to call a page if the automated row fetch returns more than one row. I have a form with a primary and secondary key. If I search only on the primary key and there is more than one row I would like to call a popup with the multiple list, is this possible?
    Regards
    Mark

    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
    -------------------------------------------------------------------

  • 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);

  • Automated Row Fetch

    I am struggling to get two forms on the same page work as they are suppose to. One of the problems is with Automated Row Fetch. To condense the problem I tried the following (on a test page):
    Created a form/table on table A with primary key PK_A
    Among other things this creates the automated row fetch for this form and a field P1_PK_A. containing the PK.
    Created another form/table on table B with primary key PK_B which creates automated row fetch for B and P1_PK_B
    Since I am concentrating on fetch process deleted all buttons and processes except FETCH row for both forms.
    Now:
    When I pass a value to P1_PK_A in the URL and no value for P1_PK_B it fetches the row in form A fine, same is true the other way around. However if I pass valid keys for both forms in the URL it fails to fetch row for the second form.
    Am I missing something or if not how am I to have two forms on a page?

    Thanks for the quick response Joe,
    I deleted the process created by the wizard and created another data manipulation process with the wizard - which created another autmated row fetch and makes no difference. By creating the fetch and DML manually do you mean that I have to create PL/SQL process to fetch the values for the second form?
    Btw how in the world I missed the part that you can't have two automated DML processes on a page I don't know.

  • Automated row fetch / Complex primary key

    I have a complex primary key made up of ticket_num, ticket_seq because there may be between 1-3 rows associated with one ticket_num.
    The problem I am having is the automated row fetch errors out when trying to update a ticket with the following error even though the combination of ticket_num, and ticket_seq are unique, and ticket_num, ticket_seq are entered in the automated row fetch as primary key column, and secondary key column.
    ORA-01422: exact fetch returns more than requested number of rows
    Is there a way to put both columns as the primary key?

    Thanks, Scott. I had the exact same problem, and your suggestion fixed it.
    May I suggest that this is a bug in Apex? In the create application wizard, select "Add Page" -> "Report and Form", and select a table with a compound primary key consisting of two columns. Apex will create the report and the form, and will configure the ARF correctly in the form, but it does not specify a value for the second key in the Link Column section of the report attributes.
    Thanks,
    Mike

  • Automated Row Fetch for complex primary keys

    I would like to post a workaround for using automated row fetch on tables with a complex primary key (more than 2 components).
    APEX has the restriction of just beeing able to handle <= 2 PK components, which is not acceptable to me in quite a lot of scenarios.
    Imagine a situation where you want to manage recipes for dishes. Each recipe has several versions and each version has several recipe-positions. The PK consists of recipe_id, recipe_version and recipe_position.
    You hava a report displaying the positions of a specific recipe version and this report contains an edit link that jumps to a form, where the attributes of a recipe position can be edited.
    Creating the edit position form, you can only specify a primary and a secondary key item/column. Given that, if you want to use the edit form by clicking the edit link, you will receive the error "ORA-01422: exact fetch returns more than requested number of rows", because the third PK compound is not used as a restriction.
    The workaround is to present the ROWID pseudo-column to the form as the primary key.
    Create a (hidden) Item to store the ROWID-Value of the current row and simply change the properties of the ARF-Process to accept ROWID as the PK column and specify the corresponding item.
    If automated processing of recipe_position is desired, you can specify it as the secondary key column.
    I don't know if this woraround/solution is very ugly, but it works ...
    Ingo

    Hello Ingo,
    I tend to avoid ROWID. In the Interactive Report it's used too.
    The ROWID can change, where a Primary Key normally doesn't change, that's the biggest thing I worry about. How does Oracle know not somebody else already updated the row?
    I always wonder what happens when you're in a cluster/RAC and use ROWID. Isn't it possible that you get two rows for the same rowid?
    Just my thoughts.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://apex-evangelists.com/
    -- http://apexblogs.info/

  • 2 Automated Row Processes for one page?

    Hey people, me again ...
    i have created 2 Regions on my Page. Each region has databasefields which references: RegionA -> a view, RegionB --> a table with the same ID (customer) ID)
    For each region i have an ARF, which was generated by the wizard.
    When i had just one Region the rowfetch worked fine. Now that i have the second Region i get a failure: "Row cannot be fetched" (debug shows that this happen in my second ARF).
    I tried to change the process point from AFTER Header to everything what i can choose ... same failure.
    If i change the sequence
    ARF_A from 10 to 20 and
    ARF_B from 21 to 10 then everything in my SECOND Region is shown.
    Same happens when i set "Set Memory Cache on display" for the second ARF.
    Isn't it possible to habe 2 ARFs for one page?
    Or where is my failure?
    Thank you for your help.
    Jana

    Hey,
    first of all, thank you for your response.
    In my first region there is a view over 3 tables. Works fine. I don't want to put more tables in this view because it is very big already.
    So i want to have another region with just a single table.
    Is there no way to have two ARF - processes on same page?

  • How to create two or more Automated Row Fetch on 1 Page

    Hello!
    Please help me to create 2 ARF processes from 2 different tables but on one Page. Is it possible in Apex 4.0?
    Thank you!

    Hi,
    Nope, i dont think so. If you want to make a form from only one table then use ARP. If you want to develop form based on two or three tables then write a custom pl/sql process of your own and you cannot able to use ARP.
    Brgds,
    Mini
    Mark Answers Promptly

  • Automated Row Fetch  Issue

    Hello
    I have a form based on a table where i have 2 keys as primary key (col1,col2)==>composite pk.
    sample values are like:
    col1 col2
    1 21
    2 21
    62 21
    62 1
    But issue is at the point where the automatic row fetching is getting executed
    [Automated Row Processing section on edit page]
    Primary column value is col1(only one column is allowed in apex Auto row fetch)
    Secondary key column is col2.
    For ex, when i access the row for col1=62, it fetches 2 rows where value=62 (based on col1)
    and i get error;
    (exact fetch returns more than 1 row)
    How to avoid this
    thanks
    kp

    Setting the proper page item in the Item Containing Secondary Key Column Value field and proper table column name in the Secondary Key Column of the row fetch screen should work. My off-the-cuff guess would be that either one of those fields does not have the correct value, or when you are branching to this page that the page item containing the secondary key is not being populated.

Maybe you are looking for

  • Can't Hear iMovie Audio On Any Of My Projects

    Firstly, I tried playing the iTunes stored in the 'Audio' Tab. I click the play button to hear the iTune and the button turns blue yet there is no sound. However, I can hear the clicks of the mouse and other such sounds. I am able to play iTunes dire

  • JNDI replication problems in WebLogic cluster.

    I need to implement a replicable property in the cluster: each server could update it and new value should be available for all cluster. I tried to bind this property to JNDI and got several problems: 1) On each rebinding I got error messages: <Nov 1

  • Help for Job BDLS - Logical System Conversion aftrer System Refresh

    hi SAP Basis Gurus, We have restored production data to test system. After that we are doing Logical System conversion - Renaming of Logical System Names. For that we are running BDLS job. The program used is IBDLS2LS. Now one job is running for more

  • My mom is receiving all my texts on her iPad after I updated my iPhone4

    My mom is receiving all my texts through iMessage on her iPad. I just updated my iPhone 4 to the latest setting tonight (i6os/ios6??) and now she is receiving all my messages! Help! SOS

  • Imac won't restart, migration assistant

    I just bought an iMac. Last night I started transferring my files, etc. from my PowerBook. When I woke up this morning, it was stuck at the same estimated time and had an error prompt . . . something about losing it's connection with the PowerBook. A