Execute query when post text item

Anybody can help ?
I create 2 block, first a data block and another is a control block with field customer_search field,
after inputing customer id in search field on control block,
I want to execute query.
my code :
set_block_property('customer',default_where,'custid=:control.customer_search');
execute_query;
error : frm-407 : illegal restricted procedure execute_query in post-text-item trigger.
How to solve this problem ?
notes: If I create one push button and put execute_query in there, every thing is fine.
but the my user does not like that.
Thank.

hi,
first of all change ur statement as
set_block_property('customer',default_where,'custid='||:control.customer_search);
means u must use pipe sign while using bind variable
secondly
u should use key next item trigger
go_block(user desired item or block);
--and then use this satemant
clear_block(no_validate);
execute_query(no_validate);
i hope it wil slove ur peoblem if it will NOT then please acknowledge otherwise we will go for a other solution
thanks
imran
manager IT
www.masoodtextile.com

Similar Messages

  • Diffrence between when-validate-item and post-text-item trigger

    What is the Diffrence between when-validate-item and post-text-item trigger, when they are written for the same item and the basic diffrence between when-validate-item and post-text-item trigger.

    Two big differences:
    1. post-text-item is only available to, and only triggered when leaving a text item, whereas when-validate-item is triggered by the forms validation process, and is available for any item type.
    2. p-t-i is a navigation trigger and you cannot invoke it programmatically, whereas the 'validate' built-in can be used to execute validation which fires the w-v-i trigger(s).

  • Validation in POST-TEXT item trigger

    Hi
    Does POST-TEXT -ITEM trigger fire in ENTER-QUERY mode?
    If not suggest me solution for following scenario:
    I have supplier field in master block. When Form is in -ENER-QUERY mode, i want to validate the user input in the supplier field before user navigate out of the field using TAB KEY (KEY-NEXT-ITEM) or MOUSE (POST-TEXT-ITEM).
    Thanks
    Cheers
    Ram

    The Forms help says that it doesn't, and nor does when-validate-item.
    It looks like you'll have to use the when-new-item-instance trigger. You can store the value of the current field and whenever the trigger fires, run some code to validate that field. If it passes the validation then store the value of the new field, otherwise put the user back in the original field.
    You'll also need to call the code from the key-exeqry trigger, so that you can validate the field which the user is in when they execute the query.

  • Post Text Item Trigger

    I have a master block and a detail block, which is a multi
    record block; for one item in the detail block I created a post-
    text-item trigger to check if this value exists;
    the problem now is that this trigger not only fires if I leave
    the item, it also fires at the beginning when the canvas is
    dieplayed and I execute a query
    can anybody tell me why this happens and how to avoid it?
    thx in advance, michaela
    null

    Michaela (guest) wrote:
    : I have a master block and a detail block, which is a multi
    : record block; for one item in the detail block I created a
    post-
    : text-item trigger to check if this value exists;
    : the problem now is that this trigger not only fires if I leave
    : the item, it also fires at the beginning when the canvas is
    : dieplayed and I execute a query
    : can anybody tell me why this happens and how to avoid it?
    : thx in advance, michaela
    What happens in your form is perfectly normal.
    You should use the When-Validate-Item trigger, and, eventually,
    set the text-item required.
    null

  • FRM-40737: illegal restricted procedure COMMIT in POST-TEXT-ITEM trigger

    Hi All,
    I tried to execute an insert statement in a POST-TEXT-ITEM trigger and use commit to save data in the db but this error appeared:
    FRM-40737: illegal restricted procedure COMMIT in POST-TEXT-ITEM trigger
    How to solve it? OR how to save every text item value entered in the database?

    I don't fully understand, why you need to insert records on post-text-item, but the possible solution is:
    Write a DB procedure which does insert and commits it.
    Call this procedure in post-text-item.
    Problems will occur if your procedure is modifying the table columns, which are used in form. Form will notice that values in DB have changed and you will have "Record has been changed by another user. Please requery to see changes" error. But if records, affected by DB procedures, are not used in form, the wverything will be OK.

  • Go-item in post-text-item oracle forms 6i

    It is not possible to use go_item in post-text-item trigger in forms 6i
    How to overcome this?

    I've never tried to force the user to do that.
    But Kevin's second solution would do it:
    Set a packaged variable and put the code in a form-level WHEN-NEW-ITEM-INSTANCECreate a package specification in the form -- I always name such a package P0.
    In the package, create a variable:  Next_Itm  varchar2(60);In your post-text-item trigger, set the package value:    P0.Next_Itm := 'BLOCK_B2.ITEM_6';In the form-level when-new-item-instance trigger:
      If P0.Next_Itm is not null then
        Go_Item(P0.Next_Itm);
        P0.Next_Itm := null;
      End if;

  • Trigger to execute query when value from LOV is selected

    HI Guys,
    I have a form in which I have 2 fields in Master and 4 fields in detail, all showing on the same canvas.
    I have put an 'execute_query' in when_new_form_instance trigger so that when I open the form it is pre - populated.
    The Master fields draw values from LOVs. I want to execute the master block query when the user selects a value from LOV, so in which trigger should I put it.
    I have tried in 'when_validate_item' and 'when_list_changed' triggers but it is showing an error.
    So, what should I do?
    Regards
    Ranjan

    I have designed a form in which there are two items in header level and two in line level. I have defined master - child relationship between the two blocks.
    I have put a execute_query for header in when_new_form_instance trigger so that when user opens the form, all fields are initially populated.
    Each Field has an LOV attached to it.
    Form Outline :
    Header : Ledger Name
    Ledger_approver
    Line : Approver
    Amount
    Initially all details for Ledger L1 is populated.
    If the user now selects Ledger L2 from LOV, then when he moves out of that item, immediately all details about L2 should get populated in the fields.
    I Have tried execute_query in when_validate_item of Ledger Name but I get error that we cannot use restricted procedure in when_validate_item trigger.
    I hope this explains my issue.
    Regards,
    Ranjan

  • Exiting the form when a text item has focus

    I am a beginner, beginner using developer/2000.
    I made a form with some text items that are linked to the
    database.
    When one of the text items has focus and I click the push button
    that i created to exit the form, I get the message FIELD MUST BE
    ENTERED.
    I want to exit the form regardless of whether the cursor is
    currently in any text items.
    I hope this makes sense.
    Thanks, fred

    What you probably want to do as well is set mouse navigate to
    FALSE on the text field.
    Regards
    Grant Ronald
    Forms Product Management

  • Execute query when submit button

    Hello, everybody.
    In my application I' ve 3 multiselect list and one button 'GO'.
    I would want after to have selected the values click on 'GO' and to execute one query. The result of the query would have to be visualized in a report under the 'GO'.
    I am using 'Reports region' Template.
    Is this possible and as I can make it?

    Moh Loay wrote:
    i am using dynamic action to set value so the page refresh and the report refresh also Your statment it not clear, usually Dynamic actions are used to AVOID entire page refresh. In your case you say that is refreshes that page!!
    What you should do is :
    - Add dynamuc actions ONLY to populate cascading LOVS.
    - Add a "go" or submit button that simple submits that page.
    - Make sure your LOVS are not select lists with submit option.
    Hope This Helps,
    Sam

  • How to enter the data into data block text item which has an LOV associated

    Hi,
    I have a data block, one of the data block text item has an LOV assigned. when I populate this text item using the LOV and do "execute_query", it is taking the value in the text item and adding it to the search criteria, but when I enter a value manually in that text item and do "execute_query" it is showing me an alert(which I created) "Please enter a value".
    My question is, why is not taking the value that I enter manually? Looks like before executing the query, this field is getting empty
    How to avoid this problem and make sure that the value entered in the text item is added in the where clause of the query?
    Any advice?
    Thanks in advance
    R.G

    Problem solved!
    Before doing execute-query, all the text items are being cleared,so I used a global variable to store that value
    Thanks anyway
    R.G

  • When Press "Execute Query" LOV return Item not showing

    I created a LOV and defined return items.
    In the form I created display items, database property NO and assign variable name which is in LOV.
    When I enter a new record LOV shows the return item but when I am executing query only database record is showing and I want to show the all item even they are in database or not.
    Message was edited by:
    Kamran

    execute query populates only database items. To populate non database items after execute query, use post query trigger.

  • When-Validate-Item and Go_Block/Execute Query dilemma

    Hey there folks -- Probably not a surprise question on this forum. I did try to search for this and came up with a few posts but did not find any solutions. Hopefully, I was also doing the correct way to search on this forum. If this is a post for the nth time on this issue, I apologize.
    So, I have 2 blocks:
    1. Control Block that contains the STUDENT_ID field (Database Item = 'N')
    2. Database block that contains the STUDENT_ID field (Database Item = 'Y' and many other fields)
    My goal is do an Execute_Query if User enters the Student ID and either presses TAB or places the MOUSE in the database block and display the record if it exists. As we know, a Go_Block is not allowed in When-Validate-Item. So, I went one step further to "simulate" this. The problem is that I am still firing the Execute-Query when the record has already been retrieved. Here is what I have so far. So, the Key-Next-Item trigger works fine if User enters a Student ID and presses tab. It also works fine if User clicks on the STUDENT_BK as the When-New-Block-Instance trigger fires which in turn calls the Key-Next-Item. The problem occurs when after record has been retrieved and User clicks on control.student_id and then comes and clicks on the STUDENT_BK, the KEY-NEXT-ITEM trigger fires again.
    Suggestions or pointers would be more than welcome.
    Thanks!
    CONTROL.student_id.Key-Next-Item
      if :control.student_id is not null and :SYSTEM.BLOCK_STATUS != 'CHANGED' then
        next_block;
        clear_block(NO_COMMIT);
        execute_query;
      else
        show_alert('Please enter Student ID');
      end if;
    STUDENT_BK.When-New-Block-Instance
    go_item('control.student_id');
    do_key('next_item');

    Yeah... I wrote before I tried it out. The GET_ITEM_PROPERTY('ITEM', previousitem) didn't work the way I thought it did. After I posted that, I tried it out and it was a complete failure.
    I guess what I am thinking now, is in your STUDENT_BK block, do you only want to EXECUTE_QUERY if the :STUDENT_ID does not match the :CONTROL.STUDENT_ID? If that is true, then all you would have to do is to change your KEY-NEXT logic to include the
    if STUDENT_BK.STUDENT_ID != :CONTROL.STUDENT_ID then
      -- original logic
      go_item('control.student_id');
      do_key('next_item');
    end if;The more I think about it, this should work for you. You said that you had two requirements: Entered a student id in the control block and tabbed or entered the database block. If you add the check of the student id then that should take care of your second requirement. If they enter the database block and the id's don't match then it will execute the query, else they already have the record displayed for them so you don't need to do anything.
    Edited by: MLBrown on Nov 19, 2012 3:08 PM

  • TEXT ITEM from different table

    When a TEXT ITEM from different table exists in the DATA BLOCK,
    and when after EXECUTE_QUERY (in trigger POST_QUERY) we issue
    the SELECT for filling the TEXT ITEM from different table, how
    we can prevent FROM_STATUS and RECORD_STATUS to get the
    value "CHANGED" (because othervise COMMIT is updating all the
    records which are the result of EXECUTE_QUERY)?

    Set the record status back to query in Post Query trigger:
    SET_RECORD_PROPERTY(:SYSTEM.TRIGGER_RECORD, 'BLOCK_NAME', STATUS
    , QUERY_STATUS);

  • 5200 : Error in executing  query -- Hyperion Financial Reporting

    Problem in accessing the Hyperion Financial Reports.User is having full access and able to access all the folders except one folder(Legal Folder reports). We are getting 5200: Error Executing the query error. Recently we have upgraded Hyperion to 11.1.1.3 version . Before upgrade user is not facing the problem. After Upgrade user is getting these errors while accessing the reports. we did research and found in "Error 5200: Error Executing Query" When Viewing Financial Reporting (FR) Reports". Is this error is relevant to the Information provided in Metalink and also can you please tell us is there any impact on doing the solution provided in the below. Why is this error is coming is any preferences needs to be changed.Please help us on this.
    Error Description:
    5200: Error executing query
    Servername/ApplicationName/DatabaseName/Error(1007090) Unknown Member name [Current Point of view for years] in Outline Query
    Doc ID 1107142.1:
    Possible Cause 1:
    If members have recently been added, moved, or deleted from the data source, Essbase, HFM, or Planning, the existing User POV records become out of sync.
    The User Point of View record uses indexing to identify the member. If the index changes because of changes in the outline, the User Point of View record no longer points to the correct location in the outline.
    To resolve the issue, you need to run the ManageUserPOV utility on a Windows server that has the Financial Reporting Reports Server, or in a Unix or Linux environment, has the Financial Reporting Print Server installed.
    You will need to provide a BIPlus Global Administrator user ID and password to run the utility.
    The utility will provide the correct syntax to run the command.
    1. In \Hyperion\products\biplus\bin\ManageUserPOV.properties, specify the following parameters:
    a. ReportServer
    b. DatasourceUser
    c. DatasourcePassword
    d. User
    e. Datasource (You can find the datasource in Workspace under Tools>Database Connection Manager in the Name column.)
    2. From the command line, cd to Hyerion\products\biplus\bin
    3. Type in "ManageUserPOV" without the quotes. The executable will read the parameters previously set in the ManageUserPOV.properties file.
    Thanks,
    Naresh.

    Take a look at this: http://adistrategies.com/index.php?loc=knowledge1&item=291
    Hope it helps.
    Mehmet

  • Display Hint Text in Oracle Forms 6i at Text Item

    Dear all seniors
    I want to show Hint text at Text Item in Oracle Forms 6i.
    when my cursor Focus goes at that item. I mean when I go with Tab key or Enter button then it show display text.
    even though my mouse is not on that item.
    please how it would be possible
    thanks.
    G.Y

    Please create a display_item(for eg. Disp_Mess) just below the text field (For eg:-MyField) where you want to show hint. And then assighn Hint text to "DISP_MESS" in NEW-FORM-INSTANCE or at Initial value. Then create a PRE-TEXT-ITEM and POST-TEXT-ITEM trigger for MyField.
    -- PRE-TEXT-ITEM trigger write following code.
    SET_ITEM_PROPERTY('DISP_MESS',VISIBLE,PROPERTY_TRUE);
    --POST-TEXT-ITEM write following code.
    SET_ITEM_PROPERTY('DISP_MESS',VISIBLE,PROPERTY_FALSE);
    It will work for you.
    Regards
    Ahamed Rafeeque Cherkala

Maybe you are looking for

  • Missing scheduled delivery of an app edition

    I missed a scheduled delivery of one of my apps last week and my kids are upset about it.  Is there anyway that it could be resent to me or emailed to me?  It was barbie printables 5/2/13 edition.  They are building all the houses and will be missing

  • Job opening in Ottawa: Teststand test software developer. Permanent postion

    Averna is an expert in the design and manufacturing of high performance test solutions used by R&D and hi-tech manufacturing companies worldwide. Our goal is to improve and optimize their engineering, production and repair activities. Our solutions a

  • Symbol __snprintf: referenced symbol not found

    Hi ALL, I complied a gui binary in solar 5.5.1 & try it run in 5.6 & 5.7. while executing its giving error like this, ld.so.1: ./jobscape: fatal: relocation error: file ./jobscape: symbol __snprintf: referenced symbol not found [1] + Killed ./jobscap

  • Constantly receiving error message

    Every 30 seconds or so, my phone displace a message that reads, "This accessory is not designed to work with the iPhone. Would you like to turn on airplane mode to reduce audio interference? You will not be able to send or receive calls." Obviously,

  • Can't open PDF on any website

    Hello, Since installing Acrobat 6 professional I am no longer able to open any pdf file linked on the internet.  When I click on the link I get a dialog box that has the title "Acrobat plug-in." and the content "This operation is not allowed".  A new