Changing fields in form opened in query mode via a link from a report

I have a summary report which allows me to access a form via a link: The form opens up with its fields populated with the corresponding record from the report.
Can additional code be added to the after displaying page section of the form such that some of the fields can be assigned with different values from those in the original record? If so, can anyone offer some sample code for this?

Hi,
You can access and set the values of the columns in forms by using certain apis. All the columns in the form are available in the session which can be accessed and set.
Sample Code
declare
flightno number;
ticketno varchar2(30);
tdate date;
persons number;
blk varchar2(10) := 'DEFAULT';
begin
flightno := p_session.get_value_as_varchar2(
p_block_name => blk,
p_attribute_name => 'A_FLIGHT_NO');
ticketno := p_session.get_value_as_varchar2(
p_block_name => blk,
p_attribute_name => 'A_TICKET_NO');
tdate := p_session.get_value_as_date(
p_block_name => blk,
p_attribute_name => 'A_TRAVEL_DATE');
persons := p_session.get_value_as_number(
p_block_name => blk,
p_attribute_name => 'A_NOF_PERSONS');
p_session.set_value(
p_block_name => blk,
p_attribute_name => 'A_FLIGHTNO',
p_value => to_char(NULL)
p_session.set_value(
p_block_name => blk,
p_attribute_name => 'A_TICKETNO',
p_value => to_char(NULL)
p_session.set_value(
p_block_name => blk,
p_attribute_name => 'A_TRAVEL_DATE',
p_value => to_char(NULL)
end;
The above code sets and gets value of the form fields. The form field is accessed by prefixing "A" to the form column name. For example if the column name is "DEPTNO" then to access or set value to it you should refer to the session variable "A_DEPTNO".
Thanks,
Sharmila

Similar Messages

  • Set search text when form is in query mode

    Hi forum members,
    is it possible to set the value of a textfield when a form is in query mode?
    In our form you can enter query mode with F7 and execute the query with F8.
    When you go back to query mode with F7 and then press F7 again, the search criteria of the past query appears.
    Now in our form there is an alternativ search, that can be executed in query mode with F9. A different search canvas appears then with a more detailed search.
    When I go back from that canvas to the initial canvas, change to query mode with F7 and try to get the last search criteria with F7, not the last search criteria (from F9 search) appears, but the first one (F8 search).
    I have tried to copy the search value into an invisible textfield and then copy it back to the search field when F7 is pressed after the alternative search canvas was closed.
    Instead of appearing in the search field, a new record is created in background.
    Is there any other way to set the value of a textfield in query mode?
    Thanks,
    Marco

    Hi Craig,
    thank you for this hint.
    Unfortunately it does not solve my problem.
    My goal is to fill the search fields with values when they are in query mode.
    I try to explain it step by step:
    Step 1
    - In my Form I change to query mode with F7.
    - I fill a search field, e.g. Name: TIGER.
    - Then I execute the search with F8.
    - Record is displayed in the block
    Step 2
    - I press the F7 Button to change to query mode again
    - Now when I press F7 again, the search values from the last search (TIGER) appear (I think it is a standard forms functionality, isn't it?)
    - I execute the search with F8
    - Record is displayed
    Step 3
    - Again I change to query mode with F7
    - I fill the search field (this time Name: SCOTT)
    - Now advanced search is executed with F9
    - A special search canvas opens over the form with result records and more detailed information to the result
    - I close the search canvas
    Step 4
    - Again I change to query mode by pressing F7
    - I want to get the search value from the last search (SCOTT) by pressing F7 again
    - Value from the first search appears (TIGER)
    My goal is to save the search value from step 3 anywhere (in a variable or copy field or something) and get it back in step 4 when the form is in query mode.
    It seems to me that it is not possible to fill fields that are in query mode, is that right?
    Thanks a lot!
    Marco

  • How do I set form automatically in query mode

    Hi !
    I have to pass value of one field as parameter from one form to
    another form and then execute the query on the next form based
    on the passed value of the parameter. (all this should happen as
    soon as I press one button on the first form).
    My problem is that unless I put the second form in the enter
    query mode before accepting the value of the field, whatever
    value I pass on from the first form will not be of any use.
    How do I set the mode of the form to query mode. Since
    system.mode is the read only variable and no value can be
    assigned to it, so how can I handle this situation ?
    Thanks in advance,
    Shobhit
    null

    Hi Shobhit,
    Try ENTER_QUERY command in the PRE-FORM trigger of second form.
    EXECUTE_QUERY in WHEN-NEW-FORM-INSTANCE and set the parameter
    values to the respective fields in PRE-QUERY trigger.
    Lalit
    Shobhit Kumar (guest) wrote:
    : Hi Steve !
    : Thanks for the answer. but I want a bit different
    functionality.
    : I have already tried using execute-query (built in) in the when-
    : new-form-instance and passed the value of the parameter in the
    : field. But all that is happening is that the value is just
    : sitting in the field and query is not getting executed
    : automatically. I am using forms 5.0 and to enter a query we
    need
    : to change the mode of the form in the query mode (by clicking
    : the enter->query button) and then enter the values in the
    fields
    : that would be used to build the query and the as soon as I say
    : execute query it executes the query and displays the results.
    : What I want is that as soon as I press a button in a form,
    value
    : of one field should go to another field in a second form and
    : then the query should get executed automatically in the second
    : form and the results should be displayed in that form.
    : Any suggestions ?
    : Regards,
    : Shobhit
    : Steve (guest) wrote:
    : : You might want to try placing the builtin EXECUTE_QUERY
    : : in the WHEN-NEW-FORM-INSTANCE trigger to auto query the form.
    : You
    : : may also want to use the SET_BLOCK_PROPERTY(DEFAULT_WHERE,
    : : '.......'); to restrict queried records or set :block.item
    : values
    : : in a PRE-QUERY Trigger.
    : : Shobhit Kumar (guest) wrote:
    : : : Hi !
    : : : I have to pass value of one field as parameter from one
    form
    : to
    : : : another form and then execute the query on the next form
    : based
    : : : on the passed value of the parameter. (all this should
    : happen
    : : as
    : : : soon as I press one button on the first form).
    : : : My problem is that unless I put the second form in the
    enter
    : : : query mode before accepting the value of the field,
    whatever
    : : : value I pass on from the first form will not be of any use.
    : : : How do I set the mode of the form to query mode. Since
    : : : system.mode is the read only variable and no value can be
    : : : assigned to it, so how can I handle this situation ?
    : : : Thanks in advance,
    : : : Shobhit
    null

  • File Upload applet not opening in Query Mode

    File Upload Applet is opening in Query Mode in Siebel 7.5, where as in Siebel 7.8 its not opening in Query Mode.
    Should anything be changed in CFG? or siebel restricted this?

    Hi,
    There is a property called "Auto Query Mode" in the applet. Check whether this has been set to "New Query" in 7.5. If so the applet will be opening in Query Mode automatically. If this property is blank, in 7.8, the applet will not be opening in Query mode. Check and let me know.
    Regards,
    Joseph

  • GETTING FORM OUT OF QUERY MODE (URGENT)

    I have a form which start in Query mode, user enter in say employee ID. If that employee exists than user bring its record else create a new record.
    What I did is start in query mode, when user enter employee ID, I check to see if record exist, if it does then I just use EXECUTE_QUERY. Now I don't know what to do for new record. If I use CREATE_RECORD that doesn't work because form is in query mode. How can I make form come out of query mode programmically?
    I am using Form 5. Trigger I am using is KEY_NEXT_ITEM in Employee ID field.
    Need urgent reply
    Thanks

    Well Faisal, I have tried this code on the EMP table in the user Scott. I think it will solve your problem
    use the key-next-item trigger
    declare
    empid emp.empno%type;
    begin
    select empno into empid
    from emp
    where empno = :empno;
    clear_block(no_validate);
    set_block_property('emp', default_where, 'empno=' | | empid);
    execute_query;
    set_block_property('emp', default_where, '');
    next_item;
    exception
    when no_data_found then
    next_item;
    end;

  • FRM:41361 Cannot navigate out of form in 'Enter Query Mode'

    Hi,
    I am using a master - detail block in my form.When I query the master block I am getting this error message
    FRM:41361 Cannot navigate out of form in 'Enter Query Mode'
    I have given DO_KEY('ENTER-QUERY') in WHEN-NEW-BLOCK-INSTANCE trigger of master block.
    and in property palette of Master block I have given the next navigation block as Detail block.
    According to the value which is queried in Master Block the Detail block should be populated.
    My form should open in 'Enter Query Mode'.This problem always happens from second time onwards
    I open the form.When I open the form first time this problem is not occuring.
    Can anyone suggest a solution for this
    Thanks,
    Nasiya

    Have you written a Key-EntQuery trigger at the Master block or the form level,
    If yes, then can you put that code here.
    The NEXT-NAVIGATION-BLOCK is only used for navigation when you use a next-block built-in on a key-trigger.
    Have you written a ENTER-QUERY command on any trigger that fires prior to the said WHEN-NEW-BLOCK-INSTANCE trigger?
    If yes, then thats the reason that the first time you run the form, your form is in ENTER-QUERY mode.
    Also, maybe execute on enter-query fails and hence the blocks are not getting populated.
    Also, ENTER-QUERY is always on a single block. And while the block is in enter-query mode, navigation out of that block is prohibited.
    you have to either have a successful EXECUTE-QUERY or use:
    EXIT_FORM(NO_VALIDATE) to come out of ENTER-QUERY mode.

  • Calling form in Enter-Query mode

    Hi
    how can i Have a form called from the menu (generated with
    headstart) start in Enter-Query mode ?
    Is there any method to do this easily ??
    TIA
    Olivier
    null

    Olivier,
    Look in the Headstart Template Package users guide. In the
    Runtime Behaviors chpt, under Inter-Form Navigation, Named Passed
    Values and Argument Passed Values, you will find an explanation
    of how to start a form in Enter-Query mode.
    Regards,
    Lauri
    Olivier GIBERT (guest) wrote:
    : Hi
    : how can i Have a form called from the menu (generated with
    : headstart) start in Enter-Query mode ?
    : Is there any method to do this easily ??
    : TIA
    : Olivier
    null

  • Open APPS  form in enter-query mode

    Hello all
    apps version 11.5
    i've created a shourtcut link that opens a specific apps form on specific responsability like
    http://<server_name>:8001/OA_HTML/RF.jsp?function_id=4893&resp_id=50239&resp_appl_id=551&security_group_id=0&lang_code=US
    the problem now that i want to send parameters for this form and execute query on this parameter
    so
    is there a way to open apps form and send parameters then execute-query directly from shourtcut or link created on the desktop ?
    Respectfully
    Khaled Farouk

    Hello all
    after along of search i'm so neear of the answer but i need some assistant from experts.
    i've reached this link which open a form and query on the data i need .
    http://<server_name>:8001/OA_HTML/RF.jsp?function_id=1634&resp_id=50244&resp_appl_id=-1&security_group_id=0&lang_code=US&params=U-iFUMNeed-3nkNG7BzN1Qr5evq7vJslGk3i3pf0ggqqSfgqDmLrk-JON9n4DZe6jMkSYPz2nfRW6va3P0GqgNlHfEu8pw6EWDZNq-MSgU1WFM5Qux.dsjTAX5J3jwjn&oas=_vSHxhm0ru79y-0HO91I_Q..
    but i'm still have a problem. how to change the parameter part? because this link is generated from the oracle Apps
    i want to change this part
    &params=U-iFUMNeed-3nkNG7BzN1Qr5evq7vJslGk3i3pf0ggqqSfgqDmLrk-JON9n4DZe6jMkSYPz2nfRW6va3P0GqgNlHfEu8pw6EWDZNq-MSgU1WFM5Qux.dsjTAX5J3jwjn
    thank all
    wiiling to have answer
    Respectfully
    Khaled Farouk

  • Form * search in query mode

    in enter-query mode, i want the form has to return in
    the field of name [fra*            ]. means it has to
    return all the names started in fra. i need in the form6i at query mode. is there any one solve it pls.
    -nasar

    The standard forms behaviour would be to use % instead of a *.
    If you like to change this behaviour you can write a pre-query trigger where you replace the * by a #, so that Oracle is able to execute the correct query.
    eg.
    :BLOCK.ITEM := REPLACE ( :BLOCK.ITEM, '*', '#' );
    Patrick

  • FRM-41361 Cannot navigate out of current form in Enter-Query Mode

    Hi All,
    I am getting the FRM-41361 error in the bottom message area when opening a form from the function navigator. The issue does not exist when opening the form from the application homepage. The form is loaded in enter-query mode, and the enter_query command is in the WHEN-NEW-FORM-INSTANCE trigger. I have checked all triggers that fire after this point for any type of navigation but do not see any. The interesting thing is, if I put a fnd_message.set_string and fnd_message.show just before the enter_query call to debug, the issue goes away entirely.
    Is it possible there are security triggers firing after the form is loaded into enter-query mode that could be causing this and that the fnd_message calls are indeed buying time for those triggers to complete before the enter_query call?
    Any help/advice is appreciated. Thanks!
    Dan

    Yes, when I looked through the triggers I made sure to look for go_block and go_item calls as well as any calls to leave the form.

  • Get value of changed field of create_decision_popup window in lineedit mode

    Hi there,
    i'm calling a create_decision_popup popup in lineedit mode.
    So i could edit the values of the selected line.
    How could i acces the value of the changed fields after closing the popup window in the event_sel event.
    Here my code:
    v_popup = comp_controller->window_manager->create_decision_popup( iv_title = 'Window title'
                                                                        iv_selection_mode    = 'LINEEDIT'
                                                                        iv_display_table     = gt_table
                                                                        iv_visible_columns   = lt_visible_columns
                                                                        iv_visible_row_count = lv_row_count ).
    v_popup->set_on_close_event( iv_event_name = 'event_sel' iv_view = me ).
    v_popup->open( ).
    DATA: lr_outputnode TYPE REF TO  cl_bsp_wd_context_node.
    lr_outputnode ?= v_popup->get_context_node( 'OUTPUTNODE' )
    Thanks,
    Regards TomSd

    You want to edit the selected value from popup, so first populate the selected row in table and then edit in the table.
    Open the popup using :
    CALL METHOD me->comp_controller->window_manager->create_decision_popup
           EXPORTING
             iv_title             = 'Route'
             iv_description       = 'Route' 
             iv_selection_mode    = 'SINGLE'
             iv_visible_row_count = '10'
             iv_display_table     = gt_route
             iv_visible_columns   = lt_table
           RECEIVING
             rv_result            = gr_popup.
    gr_popup->set_on_close_event( iv_event_name = 'DEC_POPUP_CLOSED' iv_view = me ).
    gr_popup->open( ).
    Now on close event i.e. DEC_POPUP_CLOSED write the code to transfer the selected row into the table.
    lv_outputnode ?= gr_popup->get_context_node( 'OUTPUTNODE' ).
    lv_index = lv_outputnode->get_selectedrowindex( ).
         IF lv_index IS NOT INITIAL.
           READ TABLE gt_route INTO ls_route INDEX lv_index.
           lr_col ?= me->typed_context->zroute->collection_wrapper.
           CREATE DATA lr_tab_data.
           CREATE OBJECT lr_valuenode
             EXPORTING
               iv_data_ref = lr_tab_data.
           lr_valuenode->set_properties( is_attributes = ls_route ).
           lr_col->add( EXPORTING iv_entity    = lr_valuenode ).
           REFRESH: gt_route.
           CLEAR: gr_popup.
    endif.
    Now you can see the selected row in your table view and the popup will be closed.
    To make the row editable go to htm page on which table view is created, and then modify
    editMode              = "ALL"
    in  <chtmlb:configCellerator>

  • Change Value of Veriables in Enter-Query mode

    hi all
    I have made a search utility on a table, there is reqirement that in the enter-query mode the user can enter any combination of character, in simple words there is requirement of %% at begining and at end of desired search field.
    as :system.last_query gives the value like
    SELECT ROWID,SEQ_NUM,TAG
    FROM sequel1.sequelsql WHERE ( UPPER(TAG) LIKE :1 and (TAG LIKE :2 or TAG LIKE :3)) order by TAG
    how to pad % sign in the veriables :1,:2 and :3 as need to search
    tag like ('%ASSESSMENT%')
    thanks in advance

    SELECT ROWID,SEQ_NUM,TAG
    FROM sequel1.sequelsql WHERE ( UPPER(TAG) LIKE :1 and (TAG LIKE :2 or TAG LIKE :3)) order by TAG
    1.
    have you tried to handle the items contents in a PRE-QUERY trigger ?
    If blk.item IS NOT NULL Then
       :blk.item := '%' || :blk.item || '%' ;
    End if ;2.
    You could change the WHERE clause (or the ONETIME_WHERE)
    in your KEY-EXEQRY trigger:
    Declare
       req   Varchar2(512) ;
    Begin
      req := '( UPPER(TAG) LIKE %' || :blk.item1 ||
    '% and (TAG LIKE %' || :blk.item1 || '% or TAG LIKE %' || :blk.item3 ||'%)) order by TAG ;
      Set_Block_Property( 'blk', DEFAULT_WHERE, req ) ;
      Execute_Query ;
    End ;Francois

  • Calling another form when current form is in query mode

    I have a form that is in query mode. When I select a menu option that calls another form through new_form, I get the error 'FRM-41009: Function key not allowed. Press Ctrl+F1 for list of valid keys.'
    I would like trap this error, cancel the query and invoke the new form. I have tried to do this by code similar to this:
    if :system.mode = 'enter-query' then
    exit_form ;
    end if ;
    new_form('someform') ;
    (since exit_form in query mode is supposed to cancel the query).
    But in this case, the trigger ends with the execution of the 'exit_form' statement.
    Any help would be greatly appreciated.
    Thanks and regards,
    Rajesh Jayaprakash
    [email protected]

    I think the following will work:
    When you call the EXIT_FORM builtin, Forms cancels out of Query Mode but also stops the current PL/SQ execution - which is annoying.
    I believe, though, that the WHEN-WINDOW-ACTIVATED trigger will fire on your Form. Therefore, you can:
    1) Set a Global Variable or PL/SQL packaged variable just before you call the EXIT_FORM builtin then
    2) Test the value of the Global Variable in the WHEN-WINDOW-ACTIVATED trigger and perform the CALL_FORM there.
    3) Even better, put the CALL_FORM and associated parameters into a Program Unit on the Form - then you can call it from either the original trigger or the WWA trigger as necessary.
    If this does not work, you could resort to:
    1) Set a Global Variable just before you call the EXIT_FORM builtin
    2) Initiate a TIMER
    3) Call the EXIT_FORM builtin
    4) In a WHEN-TIMER-EXPIRED trigger, check the value of the Global variable. If it's set, Call the Form you want to call
    5) Again, put the actual CALL_FORM in a Program Unit so it can easily be called with the correct parameters from wherever you need to call it.
    It's annoying that you need to go to these lengths to perform what seems to be such an easy task!
    If anyone knows any better ways of achieving this, please add another reply!

  • Starting form in Enter-Query mode disables some buttons on Smartbar

    Whenn I run a form (on the Web) which starts in Enter-Query mode, the buttons "Execute Query" and "Enter Query" are disabled on the Smartbar. Also the corresponding menu options are disabled. Besides, it is psossible to use the appropiate keys (in my case: F7 and F8).
    Has anyone experienced the same problem and is there a solution?
    Let me know.
    Thanx

    Frank: Thats what i thought too -but i saw (in other Sources) that it could be done, but how..
    Eugeniy I Duzhinskiy:
    So, many Thanks to you. It works fine !!!!
    (Its great to see there are some other Forms Users out there :) )

  • Change field on form User and change automatic on form AD

    Hello Guys,
    I need change a field on form AD (user atributtes) and when this field is changed, it should change a field on AD form.
    I know that need create a task in Process Taks, using a Copy Value to transfer this values, but this transfer does not occur. What can to be?
    Thanks

    there is no case of auto removal of lookp entries. I am sure some how it is deleted either by Design console or imported Lookup.USR_PROCESS_TRIGGER with old values. Don't worry It won't be deleted automatically.
    --nayan                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Please help: How to replace all data on mid-2010 MacBook Pro 15 with Timemachine backup from 2009 MBP 13

    OK so I bought a mid-2010 MacBook pro 15 from a friend and he did not erase anything before he gave it to me. I was previously working on a 2009 MacBook pro 13 and have a Timemachine backup from that which I would like to install on the MBP 15 replac

  • POPUP window after OVS selection

    Hi experts, After selecting an entry in an OVS I need to do a check with the selected value. To do this, in the custom controller I create a class that implements IWDOVSContextNotificationListener and do my check in the method applyResult. In case th

  • Restrict Repeat Cheque Print

    Hi , I need some of your help regarding restricting repeat cheque printing . Once a cheque is printed , it can not be printed again . But here we have customised form , customised program and customised t-code for that . Can we  maintain a z table wh

  • Twin upgrade and Unicode conversion: UMG_TWIN_PROCESS_LOGS Could not adjust

    Hello, We have done Upgrade of 4.5B MDMP system to ECC6 EHP4 MDMP and currently Unicode conversion in progress. We adopted TU&UC. Now we are importing twin spumg results of last run to our procution copy system. During running UMG_TWIN_PROCESS_LOGs.

  • Sudden Volume Increase. Only On SOME Songs?

    Well, I usually just tick the "Shuffle Songs" and go about my work...but I come across a song once in a while i will come across a song that will blow my ear drums out, even if the volume is way below half, lol. I figured this has to be something to