Auto Query Form on Page

Hi,
I'd like to have a form on a page and when the user navigates to that page I'd like the form to pick up a session variable and put it in a field on the form and run a query. So effectively auto querying a form.
I've seen it done before but cant seem to find it again.
I think that it was done by putting some PL/SQL in the 'before displaying the page' area of the additional PL/SQL section. The code would load the session, get the value, set the field value and somehow make it run a query. doQuery doesn't work here.
Any help with this would be great.
Thaks,
Michelle

I have a similar problem. In particular:
There is a private form (named MOD_ANAGRAFE_DITTA) based on a database table. The URL to
run this form is
https://portal.websanity.it/pls/portal/PORTAL.wwa_app_module.new_instance?p_moduleid=6994683181.
There is also a page from which the MOD_ANAGRAFE_DITTA form is called. To do this, a URL element was added to the page in whi
ch the above url was specified.
Based on some of the OID attributes of the user who connects to the page, when the user runs the form, the form would have to show only the record that satisfies those attributes.
To do this the following code was entered in the 'BEFORE DISPLAY PAGE' section of the FORMs Wizard:
declare
scopo varchar2(50);
user varchar2(200) := portal.wwctx_api.get_user;
BEGIN
select attrvalue into scopo
from ods.ct_scope
where entryid in (select entryid
from ods.ct_uid
where attrvalue=lower(user));
p_session.set_value(p_block_name => 'DEFAULT',
p_attribute_name => 'A_ID',
p_value => to_number(substr(scopo,1,1)));
p_session.set_value(p_block_name => 'DEFAULT',
p_attribute_name => 'A_SEDE',
p_value => substr(scopo,5));
p_session.set_value(p_block_name => 'DEFAULT',
p_attribute_name => '_CALLED_FROM_LINK',
p_value => 'SEDE');
PORTAL.wwa_api_module_event.do_event
('DEFAULT','QUERY_BOTTOM',1,'ON_CLICK',True,'',p_session);
END;
where scope is the OID attribute of user; ID and SEDE are the two table columns must to be filtered
The code to auto-query a form doesn't work as it should. The form shows all the table records. .
Perhaps the attribute used to do the query is not a session variable?
How can this be resolved?

Similar Messages

  • Auto Query Form on Page not working

    Hi,
    I created a simple form portlet and want to autoquery it on a certain record. I added this code to "Before displaying the page" :
    p_session.set_value(p_block_name => 'DEFAULT',
    p_attribute_name => 'A_STC_SAMPLINK',
    p_value => 620352);
    p_session.set_value(p_block_name => 'DEFAULT',
    p_attribute_name => '_CALLED_FROM_LINK',
    p_value => 'STC_SAMPLINK');
    PORTAL.wwa_api_module_event.do_event('DEFAULT', 'QUERY_BOTTOM', 1, 'ON_CLICK', True, '', p_session);
    This performs the query but i see this first record of my table, while it should show the record with STC_SAMPLINK = 620352. When I remove the do_event statement, i can see the field filled in correctly and when pressing the query-button manually, it does show the record with STC_SAMPLINK = 620352.
    What am I doing wrong?
    Using Application Server 10.1.2.0.2 on HP-UX

    I just discovered that it does work using p_session.set_shadow_value (with extra p_language parameter). Does this mean that note 316158.1 on metalink (based on Auto Query Form on Page is no longer valid for 10g ?

  • Link to query Form and auto-execute

    What is the secret after creating a link from a report for example, to not only pass the link parameter to a query form, but to cause the form to execute the query.
    Currently my query form shows the passed parameter but doesn't auto-execute..

    This is exactly the same question I have and there are lots of similar questions in this forum. None of them have replies. Is this question still unanswerable?

  • Could query form and result table display at seperate pages

    we are new at html db, there are a few of questions we need to clear before we make decision to use HTML DB to develop our next version of application: (I seperate them at differenct topics).
    * Could query form and query result table display at differenct pages?
    Thanks
    Lei

    yeah, this is surely possible...and quite easy. you'd just set your form page up as you'd like. put a button on that page with a branch to your report page. then have your report query refer to the items you defined on the form page. so if your form page had an item called P1_JOB and P1_DEPTNO you could have your report use those items with a query like...
    select ename, job, sal, empno, deptno
    from emp
    where :P1_JOB = job
    and :P1_DEPTNO = deptno
    ...hope this helps,
    raj

  • Custom Search Portlet: How to specify a page in the auto query?

    I want to specify a page in an auto query (Automatically display search results).
    I'm able to specify a pagegroup (Tab What to Search), but unable to select a specific page and to include/exclude subpages.
    This option is available on the SearchForm Tab. We are running 9.0.4.

    A similar question was asked in this discussion:
    Custom Search Portlet
    A Portal Search Team member replied that this feature might be included in 9.0.4.
    We are testing 9.0.4 and it's not available. When is feature this scheduled?

  • Execute query for oracle forms tab pages

    Hi Guru's,
    Please help me how to work on execute query with forms tab pages. I have created three tabs like A, B & C in one canvas.
    I have three tables and I have created three tabs in one canvas. And there is no master detail relationship with these three tables.
    I have written the code in form level - when-new-form-instance like do_key('execute_query') but when i see at run time its executing for first tab A not for tab B or tab c.
    How to get the data or execute the data in tab B and tab C.
    Thanks
    RS

    1- create a block blk_1 add items item_1,Item_2 and Item_3.
    2- create main canvas main_canvas. type Content.
    3- create tabcanvas TABCANVAS . Type Tab
    4- Create tabpages tb_1,tb_2 and tb_3.under tabcanvas
    5- create stack1,stack2 and stack3.type stack.
    6- put Item_1,Item_2 and Item_3 under stack1,stack2 and stack3.
    add when tabpage change trigger.
    Declare
    V_TapPage_Name VarChar2(100);
    Begin
    Show_View('TABCANVAS');
    V_TapPage_Name := Get_Canvas_Property('TABCANVAS',TOPMOST_TAB_PAGE);
    If V_TapPage_Name = 'TP_1' Then
    Go_Item('Blk_1.ITEM_1');
    Show_View('STACK1');
    Hide_View('STACK2');
    Hide_View('STACK3');
    ElsIf V_TapPage_Name = 'TP_2' Then
         Go_Item('Blk_1.ITEM_2');
         Show_View('STACK2');
    Hide_View('STACK1');
    Hide_View('STACK3');
    ElsIf V_TapPage_Name = 'TP_3' Then          
         Go_Item('Blk_1.ITEM_3');
         Show_View('STACK3');
    Hide_View('STACK1');
    Hide_View('STACK2');
    End If;
    End;
    Edited by: kingadmin on 20/04/2011 02:15 ص
    Edited by: kingadmin on 20/04/2011 02:16 ص

  • Auto querying using Portal form?

    A friend of mine has a report that is linked to a form, where users can edit the data. The value from the report is passed to the report, no problem, but the user must manaully click on the query button to display the information. My question is: how can I make the report query on the passed value without having to manually click the "query" button? Thanks
    Rich

    Richard,
    Please take a look at our FAQ:
    http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm
    "Building Applications" section has several examples of links how to call a form in "auto-query" mode.
    Thanks,
    Dmitry

  • Strange error while creating form/report pages [ORA-20001]

    While creating two new pages with a form and report on it, I've got a strange error. I tried to create the pages several times, but I always got the same error:
    ORA-20001: Unable to create query and update page. ORA-20001: Unable to create form on table. ORA-20001: Error creating shortcut id="" ORA-00001: unique constraint (FLOWS_030000.WWV_FLOW_SHORTCUT_IDX1) violated
    Error creating query and update.
    Return to application.
    I'm using the wizard to get the pages, like I did many times before (without problems), but this time it will not work!
    Greetings,
    Jan

    Below is a view or sql query i want to create in XE to show users report on startdate,end date,road name,etc,i am having a problem making this view work when i put the code in the sql script. Kindly help me with this if you can please. Thanks. CREATE OR REPLACE FORCE VIEW "RESULTS_DETAILS_VIEW" ("STARTDATE","ENDDATE","ROAD","NAME","STATUS","TYPE","UTILITIES","DATES","LUTON",
    AS SELECT
    d.Startdate,
    d.EndDate,
    l.Road,
    u.Name,
    ws.Status,
    wt.Type,
    cb.startdate,
    cb.enddate,
    cb.road,
    cb.utility,
    cb.type,
    cb.status
    FROM
    Dates d,
    Luton l,
    Utilities u,
    WorkStatus ws,
    WorkType wt,
    Comb cb
    WHERE cb.startDate = d.StartDate
    AND cb.endDate = d.EndDate
    AND cb.road = l.Road
    AND cb.utility = u.Name
    AND cb.type = wt.Type
    AND cb.status = ws.Status
    WITH READ ONLY
    /

  • Passing a default value to the master block and do the auto query

    Hi
    My problem is i have a MD FORM to which i have to pass a default value and do an auto query so that when i run the form the form should open with this default value and do the query and get the details.
    I tried many things like trying to set the value of the column using p_session.set_value and then calling the same form using wwa_app_module_link by using the value in the condition but every time unless i press the query button i did not get the values.
    Now i don't know what to do.
    My portal version is 3.0.7.6.2
    Some body please help me
    thanks
    Sreedhar

    I don't think this works for 3 parameters, but I know it will work for 1. Maybe you can do something with it.
    1. Create a link to the destination component (YourProvider.YourLink)
    2. Use the code below to use that link to pass the value of a form field to the destination component. 'FieldName' is the field on the destination component you want to query, and '_FieldName_cond' is the condition. This creates the destination URL.
    3. wwa_app_module.set_target(l_url) will send you to the URL you generated.
    l_url := PORTAL.wwv_user_utilities.get_url('YourProvider.YourLink', 'FieldName', v_YourParameterValue, '_FieldName_cond', '=');
    portal.wwa_app_module.set_target(l_url);
    I'm not the best at this, but this works for me in most cases.

  • Incorrect query forms in parent child relation

    Hello
    I am using jdev of RUP3 (Release 4) which is 11.1.1.6.2 and have following scenario
    I have a ParentVO (ProfileVO) and a child VO(CreditReceiversVO) (child VO is basically extended from another VO not in this application and included as a jar library).
    There a VL between ParentVO and ChildVO 1:* with two attributes ord_id and rule_id
    On UI these two VO instances are dropped as parent child and I get exception on running page in logs saying RuleAssignementEO.ORG_ID invalid identifier.
    Looking into the query formed by BC4J I see it as below which is clearly wrong as the alias RuleAssignmentEO is not visible for the outermost where clause. Please advise
    "SELECT count(1) FROM (SELECT * FROM (SELECT /*+ FIRST_ROWS(10) */
    RuleAssignmentsEO.RULE_ASSIGNMENT_ID,
    RuleAssignmentsEO.OBJECT_VERSION_NUMBER,
    RuleAssignmentsEO.RULE_ID,
    RuleAssignmentsEO.ASSIGNED_OBJECT_ID,
    RuleAssignmentsEO.ASSIGNED_OBJECT_TYPE,
    RuleAssignmentsEO.ORG_ID,
    RuleAssignmentsEO.ROLE_ID,
    RuleAssignmentsEO.START_DATE,
    RuleAssignmentsEO.END_DATE,
    RuleAssignmentsEO.SPLIT_PCT,
    RuleAssignmentsEO.REVENUE_TYPE,
    RuleAssignmentsEO.ROLLUP_FLAG,
    RuleAssignmentsEO.CREATED_BY,
    RuleAssignmentsEO.CREATION_DATE,
    RuleAssignmentsEO.LAST_UPDATED_BY,
    RuleAssignmentsEO.LAST_UPDATE_DATE,
    RuleAssignmentsEO.LAST_UPDATE_LOGIN,
    RuleAssignmentsEO.ATTRIBUTE_CATEGORY,
    RuleAssignmentsEO.ATTRIBUTE1,
    RuleAssignmentsEO.ATTRIBUTE2,
    RuleAssignmentsEO.ATTRIBUTE3,
    RuleAssignmentsEO.ATTRIBUTE4,
    RuleAssignmentsEO.ATTRIBUTE5,
    RuleAssignmentsEO.ATTRIBUTE6,
    RuleAssignmentsEO.ATTRIBUTE7,
    RuleAssignmentsEO.ATTRIBUTE8,
    RuleAssignmentsEO.ATTRIBUTE9,
    RuleAssignmentsEO.ATTRIBUTE10,
    RuleAssignmentsEO.ATTRIBUTE11,
    RuleAssignmentsEO.ATTRIBUTE12,
    RuleAssignmentsEO.ATTRIBUTE13,
    RuleAssignmentsEO.ATTRIBUTE14,
    RuleAssignmentsEO.ATTRIBUTE15,
    RuleAssignmentsEO.GROUP_MEMBER_CREDIT_FLAG,
    RuleAssignmentsEO.SUMMARY_FLAG,
    ParticipantEO.PARTICIPANT_NAME,
    ParticipantEO.PARTICIPANT_ID
    FROM CN_RS_RULE_ASSIGNMENTS_ALL RuleAssignmentsEO, CN_SRP_PARTICIPANT_HDR_RO_V ParticipantEO
    WHERE RuleAssignmentsEO.ASSIGNED_OBJECT_ID = ParticipantEO.PARTICIPANT_ID(+)) QRSLT WHERE RuleAssignmentsEO.RULE_ID = :Bind_RuleId AND RuleAssignmentsEO.ORG_ID = :Bind_OrgId) "
    Edited by: Vik2 on Oct 23, 2012 11:30 AM

    invalid identifier means ,it representating that field currently not available in db-table.
    so please refer db-table. whether field avialable or not?.
    edited lately:
    djbo.debugoutput=console did you use this :) it will say the query is send to server.
    Edited by: user707 on Oct 22, 2012 11:58 PM

  • Can I style Web Forms Confirmation Page Results - Specifically the "ERROR" message in the results?

    Hi,
    Can I style Web Forms Confirmation Page Results - Specifically the "ERROR" message in the results?
    {module_webformresults} is auto rendedered as a table with CSS IDs attached but nothing specific for the ERROR message - resulting in the error not being seen.
    The ERROR is triggered by a dulplicate User Name or Password.
    I tried using a JQuery text selector, but it does not work with the results for some reason.
    Any ideas?
    Attached is are the error results, see Username
    Thanks!
    P

    Hi Patrick,
    It should work. You know the id of the specific area, you know what string to search for in order to condition the appearance of the new message.
    Kind Regards,
    Alex

  • Linking back to a query after action page

    Wondering if anyone knows the best way to add a link on an
    action page that will take a user back to a completed query page.
    What I have is a query results page that allows to edit or delete,
    after the action of either edit or deleting I need to bring the
    user back to the first query page so they can edit or delete more
    if they wish.
    This sounds easy but I can't figure out how to do it. I am
    assuming I will need to pass the completed query information
    through to my action page so I can link back to it? Below is my
    code:
    Query Page (finddate.cfm):
    <cfquery name="qstudents" datasource="ardexseminars">
    SELECT * FROM registrants WHERE seminardate = '#seminardate#'
    ORDER BY seminardate, seminar
    </cfquery>
    <form action="groupdelete.cfm" method="post">
    <cftable query = "qstudents"
    startRow = "1" colheaders colSpacing = "6" HTMLTable
    border="1" headerlines="2">
    <!--- each cfcol tag sets width of a column in table, and
    specifies header
    information and text/CFML with which to fill cell --->
    <cfcol header = "<c>Admin</c>"
    align = "Left"
    width = 25
    text = "<a href=editstudent.cfm?id=#id#>Edit</a>
    | <input type=checkbox name=remove value=#id#>Delete | <a
    href=viewsaved.cfm?letterid=#id#>View Saved</a>">
    <cfcol header = "<c>Seminar</c>"
    align = "Left"
    width = 25
    text = "#seminar#;#seminar_type#">
    <cfcol header = "<c>Seminar Date</c>"
    align = "Left"
    width = 25
    text = "#seminardate#">
    <cfcol header = "<c>Name</c>"
    align = "Left"
    width = 25
    text = "<a
    href=display.cfm?id=#id#>#name1#</a>">
    </cftable>
    <br>
    <center>
    <input type="submit" value="Delete Selected">
    </center>
    </form>
    Action Page (groupdelete.cfm)
    <cfquery name="delstudents" datasource="ardexseminars">
    DELETE FROM registrants WHERE id IN (#form.remove#)
    </cfquery>
    Registration info deleted
    <br><br>
    <A HREF="no idea what to put here..">Back</A>
    That back link is where I need to bring them back to the
    query page (finddate.cfm).
    Thanks in advance for any help.

    >> <A HREF="no idea what to put
    here..">Back</A>
    <A HREF="finddate.cfm">Return to the previous
    page.</A>
    If you need to send back a couple of variables, add them to
    your URL. For example, you mention returning to a "completed query
    page." You might want to send back
    finddate.cfm?seminardate=#seminardate# and requery the
    database.

  • JSP Query Form

    Hello,
    I used Jdev 903 wizard to create a JSP Query and Browse Form for a table with many columns. It worked well. However, I want to limit number of columns in the query form, also to break up the columns to be in many section in the display page. I looked into many way; but didn't find anyway. Please help!
    Thanks.
    Andy.

    Once you create the Query-by-Form datawebbean, you can modify the templates in the templates\webapp directory by changing all usages of the FindForm bean to use your new DWB. You can also create a new webapp template by copying the existing file and creating a new directory. You can add you new template by modifying the templates\apptemplates.xml. The current entries are:
    <?xml version="1.0"?>
    <APPTEMPLATES>
    <TEMPLATE NAME="default" DIRECTORY="templates/webapp/" USETHEMESELECTION="YES">
    </TEMPLATE>
    <TEMPLATE NAME="Oracle" USEFORMSELECTION="NO" DIRECTORY="templates/cabowebapp/" THEMEDIR="/webapp/jsimages" THEMECSS="/webapp/cabo/images/cabo_styles.css" USETHEMESELECTION="NO" TOOLBARCLASS="oracle.jbo.html.databeans.JSNavigatorBar">
    </TEMPLATE>
    </APPTEMPLATES>

  • ORA-20001: Unable to create query and update page.

    I am using the wizard: Form on a table with report 2 pages. I do not change any of the values when using the wizard (just taking all default values)
    I created over 10 pages successfully already.
    When creating the one page, I received this error on clicking the 'Finish' button
    Error creating query and update.
    Return to Application
    ORA-20001: Unable to create query and update page. ORA-12899: value too large for column "FLOWS_010500"."WWV_FLOW_PAGE_PLUGS"."PLUG_QUERY_COL_ALLIGNMENTS" (actual: 269, maximum: 255)
    Seems like it might be table related since I can continue and create more forms/reports on other tables.
    Any help would be appreciated.

    336554,
    Looks like there is a 127-column limit on the number of report columns supported when using that wizard. Do you have more than that?
    57434

  • Query form when opening the application (update state)

    How do I set a form to auto query when opening it?
    I read some things about, but did not find a good answer. I made a button which updates selected values in two LOV's. For that button to appear, i need to press the Query button. Else it is not visible.
    Any id how I can get the form to open in a state, that the update button becomes visible?
    THANKS!

    I was able to do this with Javascript. In your first lOV, add the following code in the OnChange event:
    javascript:for (var i=0; i < document.forms[0].elements.length; i++)
    if (document.forms[0].elements.name.substring(document.forms[0].elements[i].name.indexOf('DEFAULT.')+8,document.forms[0].elements[i].name.lastIndexOf('.01')) == "QUERY_TOP")
    do_event(this.form, document.forms[0].elements[i].name, 1, 'ON_CLICK', '');

Maybe you are looking for