Form based on Procedure - coding methods

I would like to create a Portal Form based upon a stored
procedure. I can't seem to find any documentation which
describes the necessary procedural functions.
The form requires standard select, update, delete
capabilities. How does that the procedure 'know'
which operation is being requested by the Form ?
Does anyone have a sample procedure they could include
in the reply ?

Hi,
For documentation purpose, you can read Oracle9iAS Portal Bible -
they have a complete chapter on creating forms based on stored
procedure.
Hope this helps.
Regards,
Jatinder

Similar Messages

  • Pass Value by Form Based on Procedure in Target Frame

    I made a form based on procedure and trying to pass all variables to a target frame called "dest2". I got the sample code on this forum and used window.location, but then I figured it can't pass values to another frame. I tried window.open, but can't seem to figure out how to code it.
    Basically on the page, it has the portal form using stored procedure, and a IFRAME named "dest2".
    The detail my stored procedure is:
    ====================
    Create or Replace Procedure WM.TEST
    p_from_date IN VARCHAR2,
    p_to_date IN VARCHAR2,
    p_desformat IN VARCHAR2,
    as
    begin
    htp.p('<script>');
    htp.p('window.location="http://domain/portal/page?_pageid=1063,801014&_dad=portal&_schema=PORTAL&p_from_date='||p_from_date||'&p_to_date='||p_to_date||'&p_p_desformat='||p_desformat||'"');
    htp.p('</script>');
    end;
    ===============
    Does anybody know how to modify this procedure to pass value to target frame = "dest2" ?
    Thanks,
    Sal

    Hi,
    For documentation purpose, you can read Oracle9iAS Portal Bible -
    they have a complete chapter on creating forms based on stored
    procedure.
    Hope this helps.
    Regards,
    Jatinder

  • Can't post multiple values using forms based on procedure

    I want to post multiple values from form based on procedure. Is it possible?
    I've tried following steps:
    - create LOV with Multiple Values format
    - create form based on procedure
    - in Formatting and Validation page choose required item
    - select item type - combobox, enter input height = 5
    - select my LOV for item
    after creating form I get listbox, but selecting multiple values (with Ctrl or Shift key) not working...
    what's wrong.
    I'm use portal 9.0.2.2.22

    Hi,
    It is not possbile right now with Portal Forms to submit multiple values to a field.
    Thanks,
    Sharmila

  • Calling a report from a form based on procedure

    I created a form based on a procedure.
    It is a entry form where the user is selecting or enters data then on submit I must display the report based on selected data.
    I know I can simply create a report with all bind variable and do the job.
    My question is what is the syntax to call the report from the procedure for the selected parameters values.
    Thanks
    Lawrence

    If you want to display other HTML page after successful submission, you need to use
    either go or call method.
    I created a form on SCOTT.EMP and a report on SCOTT.EMP and the report accept a parameter for
    the deptno. Here is my on successfull submission code:
    declare
    l_dept number;
    l_url varchar2(2000);
    begin
    l_dept := p_session.get_value_as_number('DEFAULT', 'A_DEPTNO', 1);
    l_url := 'scott.rpt_mask_1.show?p_arg_names=emp.deptno&p_arg_values='&#0124; &#0124;l_dept;
    go(l_url);
    end;
    null

  • Performance Form based on procedure vs based on table/view

    When we design our form, and want to optimize the performance, we came to a question. Will the performance of a form based on a procedure is better or a form based on a table/view is better? And why is it better? or worse?

    Hello,
    For me, the question is not "is the stored procedure based block is faster than table based block ?", but "do i use the DML array functionality with table based block?"
    If you do not use DML array functionality, then you generate as many roundtrips as you get raws in your block.
    With stored procedure based block, you transmit a pl/sql table of record to the procedure.
    Anyway, you could do some tests to compare the 2 solutions.
    Francois

  • Trapping exceptions/error messages on form based on procedure

    I am trying to display meaningful error messages when various exceptions arise. I have created a form based on a procedure and the procedure works and returns an exception where I want it.
    I have been trying to use the PL/SQL Button event handler to return an error message to the user, but have not succeeded. I have tried:
    doSubmit;
    exception
    when others then
    p_session.set_value(
    p_block_name => 'DEFAULT',
    p_attribute_name => '_STATUS',
    p_value => 'my error message';
    (I have run this code both with a return at the end and not.)
    This runs, but this return a page that says:
    Error: WWV-0000.
    (It does not display 'my error message'.)
    I have also tried, from the Portal FAQs:
    doSubmit;
    exception
    when others then
    wwa_app_module.set_target('myschema.MY_ERRORS.SHOW?p_arg_names=p_errcode&p_arg_values=-1',
    'GO');
    where my_errors is a dynamic page that displays an error message when you pass it a value, in this case, -1.
    I get the following error message from this code:
    PLS-00201: identifier 'WWA_APP_MODULE.SET_TARGET' must be declared
    I did find some discussions on problems with exceptions when you have a form based on a procedure, but these were from 2001. Any help with this or directions to documentation would be greatly appreciated.

    I worked out one answer: the code provided by Oracle for the second example omitted the portal schema qualifier on the wwa_app_module. It should be (for 10g release 2, at least)
    PORTAL.wwa_app_module.set_target('myschema.MY_ERRORS.SHOW?p_arg_names=p_errcode&p_arg_values=-1',
    ^^^^^^^^^^
    'GO');
    This worked, and returned the custom error message.
    I still can't figure out why the p_session.set_value returns an error message that's just WWV-0000, but I would like to. Any help, even just what page in what document to look at would be appreciated.

  • Ora-01843 when Form is based on procedure

    I create a page using form based on procedure option. I have a date picker item in the form that corresponds to a date parameter in the procedure.
    I select every date format APEX provided from APEX date picker and always got ora-01843(not a valid month) error when I tried to sumbit the form.
    I have changed PICK_DATE_FORMAT_MASK to DD/MM/YYYY at application level but cannot solve the problem.
    Does anyone using a "Form on Procedure" and happen to have a date column? Do you have similar problem?
    ps. this problem only occurs to "Form on Procedure". I have no problem with master details or many other form options. I am using APEX 3.1.

    Hello user3003555,
    I have created forms based on procedure and used date pickers on them but don't recall encountering the date format error ORA-1843. I used "Date Picker (DD-MON-YYYY)" which corresponds to my application date format. I'm not sure what else I can tell you. Have you tried picking a date where the month and day are interchangeable to confirm that it is a formatting issue?
    - Alwyn

  • Form based on a procedure - question out parameter

    hello,
    I have created a form based on procedure:
    PROCEDURE "PRC_REQ_CREATE" (
    vuser_id in number,
    vapp_study_id in number,
    vinformation in varchar2,
    vstate_id in number,
    vaction_id in number,
    vaccount out varchar2
    the new form see all the parameters.
    When I execute the form, the value for the out parameter is displayed on a separated window.
    How can I display it in the vaccount field of the form ?
    What can I do if I want to use this value in another form or report as a parameter?
    Thanks for your help
    Didier

    I do know how you can use the out in a redirect.
    Basics are:
    Comment out the doSubmit in the pl/sql submit buffer,
    declare your variables,
    get your in variables that are being passed,
    call the procedure directly from your code, storing the new variable.
    do your navigation.
    Or for an example, something like:
    --- Type your PL/SQL code here...
    doSubmit;- This is the default handler
    --- ...and here, thanks...
    declare
    v_appt_in number;
    v_appt_out number;
    l_target varchar2(300);
    blk varchar2(10):='DEFAULT';
    begin
    v_appt_in:=p_session.get_value_as_number
    (p_block_name=>blk,p_attribute_name=>'A_V_APPT_ID');
    appt.arrive_no_show(v_appt_in,v_appt_out);
    l_target :=
    'portal.wwa_app_module.linkp_arg_names=_moduleid&p_arg_values=1147314217';
    l_target := l_target || '&p_arg_names=APPT_ID&p_arg_values=' || v_appt_out;
    l_target := l_target || '&p_arg_names=_APPT_ID_COND&p_arg_values==';
    PORTAL.wwa_app_module.set_target(l_target);
    return;
    end;
    To display it in the field, I'ld suggest using set_value...

  • Forms based on query?  Is it possible in Oracle Portal?

    here is my code that i want to use
    SELECT a.first, a.last, b.Position_CD, c.skill_cd, d.team_name, d.team_country, d.club, e.structure_name
    FROM Roster a, Roster_position b, roster_skill c, team d, team_structure e
    where (a.Roster_ID = b.roster_id (+) and (b.roster_id = c.roster_id (+) ) and (a.team_cd = d.team_cd(+)) and (a.team_structure_cd = e.team_structure_cd (+)))
    order by a.roster_id;
    Is it possible for oracle portal to support such a query in a form?
    Oracle portal supports single tables or views...master-detal...and forms based on procedures.
    Since the above query associates with moro then one table..how might one create a form based on that query? Is their a way in oracle portal to create a form and have its record source be based on such a complex query and be able to update and insert data? I know and have tested that it works in Ms Access and i can update and add data in that above query. Hopefully oracle supports this. (*cross fingers*)
    If i cant do what i said above...what advice or suggestions you guys have for me? If i use master-detail it won't work right because i need to involve all 5 tables.
    Any help or comments are greatly appreciated!

    When i made the above query a view and created an oracle portal form. I get this error when I try to retrieve all the records in that view i made above.
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
    What does the "key-preserved table" mean?

  • Master/Detail Form based on view(s) - Bug?

    I made a master/detail form that is based on two views, and later master was a view and detail was a table. The form opens OK, but when I click query-button, the following error appears on the screen:
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
    When you create a form you are offered three different choices:
    1. Form based on table or view
    Build a form based on a database table or view.
    2. Master-detail form
    Build a master-detail form based on two tables or views. <---- ?????
    3. Form based on procedure
    Build a form based on a database stored procedure
    Is it at all possible to use views with master/detail?

    View should have a rowid. To create a rowid tables have to have foreign key relation. And also in where clause you should have PK-Field-Name=FK-Filed-Name statement.
    null

  • Link to form with stored procedure

    Hi all,
    We want to have a report with a link that goes to a form that updates using a stored procedure.
    The update form has to get the recent data (not the data from the report).
    To do this we want to pass the id parameter and with that get the rest of the fields from the table.
    Does somebody know how to do this?
    TIA,
    Igor & Eric

    Create a report.
    Create a form based on procedure.
    Create a link based on the above form.
    Attach this like to the report Id column.
    Now edit this link and supply the value for ID (Select the column) for the corresponding form field.
    Thanx,
    chetan.

  • Calling a form based on a procedure from a report

    I have a report and want the user to link to a form based on a stored procedure passing params from the report record. That I can do using the link option. But to complicate matters I have more than one form based on a procedure and depending on values in the reports data depends on which form will be called (passing values to the form (all based on stored procedures).
    How can I do this ?
    Any advice would be really appreciated.

    If you want to display other HTML page after successful submission, you need to use
    either go or call method.
    I created a form on SCOTT.EMP and a report on SCOTT.EMP and the report accept a parameter for
    the deptno. Here is my on successfull submission code:
    declare
    l_dept number;
    l_url varchar2(2000);
    begin
    l_dept := p_session.get_value_as_number('DEFAULT', 'A_DEPTNO', 1);
    l_url := 'scott.rpt_mask_1.show?p_arg_names=emp.deptno&p_arg_values='&#0124; &#0124;l_dept;
    go(l_url);
    end;
    null

  • Help: FRM-40505 for a FORM based on stored procedures

    Hi,
    I am working on a FORM based on stored procedures. When it performs a query, it actually returns record, but still comes with the message FRM-40505: ORACLE error: unable to perform query. Any recommendations on the possible coding area to check?
    Thank you in advance.
    Jimmy

    Jimmy,
    To base a block on a stored procedure is not a simple task because it depends on the .....
    .... stored procedure !
    If you do not provide much information (like the famous stored procedure), we could not do anything for you.
    As much information you provide, as much chance we have to understand the problem.
    Francois

  • How do I get data to the from in a form based on a stored procedure

    I would like to create a form based on a stored procedure. I have bound LOV's that lookup the ID of the data that is to be displayed on the form. Then I have a button that reads the database and populates the fields on the form. This is our current UI standard on our portal site, and I need to copy that UI exactly in order to mix HTML DB code with our current portal code because we can not afford to re-write all our code in portal to HTML DB. Can this be done, and how can it be done? Thanks

    We are developing an entire HR system for our organization using portal forms. I am trying to prototype in HTML DB to see if we can switch our future development to this new product. However, we already have 50 or so forms that follow a certain user interface look and feel in portal. I am trying to create this interface look and feel in HTML DB. What we are doing in Portal is have a lookup section at the top of each form where you find the record you want to update with LOV's, sometimes 2 or 3 bound together, and then have a lookup button that does PL/SQL to read the database and populate the fields on the form. Then there is an Update button at the end of the form that takes the fields off the form and passes them to a stored procedure. I can not figure out how to do the Lookup button type of code to read information and bring it to the form when doing a form based on a stored procedure.

  • Return values for a Form based on a procedure

    Hi,
    I am fairly new to Portal Applications.
    I have a form based on a procedure.
    The procedure has an IN OUT parameter and what happens at the moment is that once the submit button is pressed the IN OUT parameter is displayed on a new page.
    My question is...
    How do I display the returned value in a field on the form?
    Please help
    Thanks

    Hi,
    This is how it works right now. It is not possible to show it in the same form.
    Thanks,
    Sharmila

Maybe you are looking for

  • Getting an Error While Retrieving a Blog Data From Database

    Hi, I am trying to make a blog. I  have successfully instered the blog into the database. Now I have displayed the stored blog on the main page and tried linking it to the database to open the blog on the seperate page. Now when the data is linked to

  • No records

    Hi , I have converted the forms4.5 to forms 6i, adn after conversion when I tried to query the data I get no records where as there are records in the database. It does selects the rows from 4.5. What could be the problem.Am I turning something off?

  • Can't import XML from Premiere CS6 to Final Cut Pro X?

    Hi, I've been using Premier CS6 but I have downloaded the trail of FCPX and wan't to give that a try on my mac. I have edited the video in Premiere CS6 and exported it with the "Final cut pro xml" feature in AP CS6. I've exported the map containing t

  • How to save a file into file system from database?

    Hi! I am using AppEx 2.2.1.I have created a report showing the filename and id of a table. The table has a blob column containing the file.I want to hyperlink filename, so that I can go ahead and save it into my file system. But I don't know what to

  • C++ support for VxWorks?

    Does Berkeley DB support the C++ API for VxWorks development? I notice that there is no db_cxx.h file in the build_vxworks directory. Thanks.