Execute Query on form opening
Hi,
I am developing an application....in that application I have two forms...one is Form A and the other one is Form B ...
Scenario Is ...Form A has a detail block with the fields like VOUCHERNO, DATE, AMOUNT. I want user to double click on FORM A'S detail block and it should pick that VOUCHERNO (read in global variable ..ive done this already) ...and on FORM 'B' which is a voucher maintenance form...contains that VOUCHER'S MASTER BLOCK and VOUCHER DETAIL BLOCK...fill that voucher no from global variable and automatically EXECUTE QUERY to bring the details of that voucher in form b's detail block.
My problem is that on NEW FORM INSTANCE of form B ive checked the record status its 'NEW' ..whenever I move the global variable value in voucher no for Form B to execute query it says WANT TO SAVE CHANGES ? YES NO CANCEL...even though I've used clear_form(no_validate)...ive used ENTER_QUERY also...but the problem is remain the same...please help and tell me how to do this. Thanks
create a PRE QUERY in Form B. There you use the global-variable
use the query-technique of my one-time-timer http://talk2gerd.blogspot.com/2007/01/one-time-timer.html
PRE QUERY:
BEGIN
IF :global.nameOFglobal IS NOT NULL THEN
:EMP.ENAME := :global.nameOFglobal;
END IF;
END;try it
Gerd
Similar Messages
-
Clearing Form when changing from Insert Mode to Enter/Execute Query
Morning folks,
I need some help or pointers with a form I am working on. At startup, the form is in Insert mode. I am using Oracle Forms 9i.
Goal: Clear the form with NO_VALIDATE when User enters an ID in Insert mode and clicks on the Execute Query button(DEFAULT&SMARTBAR Inbuilt Menu)
The user can do two things when they first open the screen.
Option 1: Enter the STUDENT_ID and press Tab
Option 2: Enter the STUDENT_ID and press the Execute Query button (Part of the DEFAULT&SMARTBAR Inbuilt Menu)
There is a When-Validate-Item trigger on STUDENT_ID to check if the Student ID already exists in the database. If it does, it gives an Error message saying "Student ID found. Please Query the record or enter a new Student ID". This is fine with Option 1.
The problem arises with Option 2. When I Enter a Student ID in Insert Mode and (thinking I am in Enter Query mode) and press the Execute Query button, I get two messages:
Message 1: "Student ID found. Please Query the record or enter a new Student ID"
Message 2: Oracle message "Do you want to save the changes? Yes/No/Cancel.
Is there a way to stop this *Message 2?*
Here is what I have done to try and mitigate this situation. I have created a non database field and have called it clear_form.
In When-Validate-Item I set the field clear_form = 1 when I encounter *Message 1*
{code}
if t_record_exists > 0 then
set_alert_property('ALERT_ERROR',ALERT_MESSAGE_TEXT,'Student ID found. Please Query the record or enter a new Student ID');
alert_button := show_alert('ALERT_ERROR');
:clear_form := 1;
end if;
{code}
By creating *Key-EXEQRY* Trigger at Form Level, I was hoping that it would just clear the form. I put some messages and its seems to me that *KEY-EXEQRY* is firing first and then the *WHEN-VALIDATE-ITEM*. Is there a way to have the *WHEN-VALIDATE-ITEM* trigger fire first?
{code}
if :clear_form is null then
execute_query;
else
clear_form(no_validate);
end if;
{code}
Thanks!
Edited by: Roxyrollers on Sep 28, 2012 8:50 AM
Edited by: Roxyrollers on Sep 28, 2012 9:45 AMHaving the actual Student_ID column from the table is dangerous, since it is also the key to the student's data. What if the user properly executes a query, showing a student's data, and then wants to look up another student, so keys in the new ID. If he then presses Execute Query, the Form asks "Do you want to save your changes?"
If the user presses Yes, the new ID becomes the previous student's key.
It would be better if you put the student_ID field in a control block. Then, the user enters a Student_ID, and presses Execute Query, the query then populates the student's data in the Base Table block. In the B_T block, the actual Student_ID column should be hidden. -
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
RS1- 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 ص -
After Execute Query I cannot modify fields values.
I enter in "enter-query", put some values and I enter in "execute-query", my forms return filled with database values, but I cannot modify the fields and update records, when I try to modify, exception raises: FRM-40200.
What Can I do to solve this?
Thanks for patience.Check in your form if the property is changed at runtime.
Check for set_item_property(<item_name>,INSERT_ALLOWED,property_false);
Check for set_item_property(<item_name>,UPDATE_ALLOWED,property_false);
or
Check for set_block_property(<block_name>,INSERT_ALLOWED,property_false);
Check for set_block_property<block_name>,UPDATE_ALLOWED,property_false);
Cheers
AT -
Hi.
I have a strange problem with 11g forms. Must say I would not believe it if I did not see this myself. The problem is when I do F11 (enter query), make some conditions, do ctrl+F11 the query gets executed. But when I do the same thing using toolbar icons to enter and execute query any form crashes. I have the key-entqry and key-exeqry triggers defined on form level. Form toolbar icon I call do_key('ENTER_QUERY') and do_key('EXECUTE_QUERY') respectively. I just cant imagine what is the difference in using function keys and doing do_key as in my case. The same functionality is 100% tested and work on Forms 10g.
Anybody with the similar problem?
Best regards.The form crashes too.
When I create a new menu with only two menu-items(do_key('ENTER_QUERY') and do_key('EXECUTE_QUERY')) and attach it to your form, it works.
This is the stack trace:
Last Trigger FORM/BLOCK/FIELD: TEST_CRASH.DEPT.DEPTNO
Last Trigger: KEY-ENTQRY - (Successfully Completed)
Last Builtin: EXECUTE_QUERY - (Successfully Completed)
----- Call Stack Trace -----
Symbol file D:\Oracle\Middleware\as_1\RDBMS\ADMIN\oracore11.SYM does not match binary
Symbol file D:\Oracle\Middleware\as_1\RDBMS\ADMIN\oraclient11.SYM does not match binary
Symbol file D:\Oracle\Middleware\as_1\RDBMS\ADMIN\orageneric11.SYM does not match binary
calling call entry argument values in hex
location type point (? means dubious value)
Symbol file D:\Oracle\Middleware\as_1\RDBMS\ADMIN\oracore11.SYM does not match binary
Symbol file D:\Oracle\Middleware\as_1\RDBMS\ADMIN\oraclient11.SYM does not match binary
Symbol file D:\Oracle\Middleware\as_1\RDBMS\ADMIN\orageneric11.SYM does not match binary
_skgpexit()+15 00000000
kgucrsh()+7 CALLrel sltln()+4 0 0
__VInfreq__kgebse() CALLreg 00000000 2B69108
+1023
kgerse()+111 CALLrel kgepop()+0 2B69108 2B91A54 258
__VInfreq__kglsupd( CALLrel _kgerse()+0 2B69108
)+50
kglpnds()+69 CALLrel kglpndl()+0 2B69108 2E683A0 1
_kgstmComputeTransl CALLreg 00000000 2B69108 2E683A0 1 2B69108
ation()+28 2B997C0 2E683AC
kgssinit_state()+ CALL??? 00000000 2E683A0 1 2B69108
189
_kgstmComputeRefEpo CALL??? 00000000 2B99794 1 2B69108 2B69108
ch()+173 2B99794 2B50954
_kguucad()+75 CALL??? 00000000 2B99794 1 2B69108
667C7E09 CALLrel 66837BB6 1 1 2B69108
668125A4 CALLrel 66741A73 2173920 2B50954 1 1
66811F9B CALLrel 66812548 2173920 2E4C960
ipkdedxDestroyXCo CALLrel _depxcdestroy()+0 2173920 2E4C960
ntext()+104
00000001 CALL??? 00000000
----- End of Call Stack Trace -----
I modified your menu(e.g. remove the menu roles), but it still crashes.
Something strange in the stack trace:
Last Trigger: KEY-ENTQRY - (Successfully Completed)
Last Builtin: EXECUTE_QUERY - (Successfully Completed)
I expected as last trigger KEY-EXEQRY, because the EXECUTE_QUERY is cald from this one...
I suggest you contact Oracle support with your testcase.
Sorry I couldn't help... -
5200: Error executing query: The data form grid is invalid.
Hi,
I am getting this error " 5200: Error executing query: The data form grid is invalid. Verify that all members selected are in Essbase. Check log for details.
com.hyperion.planning.HspException;hasPovDims=1;povXML=<?xml version="1.0"?><datasources><datasource name="Profit " dsid="228af2c3_129ca3dd85c_-77b1" allowEdit="1"><dim name="Period" dimIndex="1" dsName="Profit " keyDimName="Period" memberName="Apr" displayName="Period: Apr"/><dim name="Year" dimIndex="2" dsName="Profit " keyDimName="Year" memberName="FY10" displayName="Year: FY10"/><dim name="Entity" dimIndex="5" dsName="Profit " keyDimName="Entity" memberName="9999" displayName="Entity: 9999"/></datasource></datasources>"
I have checked that both the systems essbase and planning are same. nothing's different. still i cannot find the exact reason why the report is not working.
can any please help me.
btw, i am using Hyperion Planning 9.3.1
Thanks,
BIMSHi
You probably deleted some members from outline that are used by report
I would recommend you to open you report/grid via rep.client and try to find which elements are abcent
Regards
Alexander
Edited by: Softperson on 19/8/2010 17:38 -
10g Form - first execute query - very slow
I have the following issue:
Enter an application
open a form in enter query mode
first time execute query is very slow (several minutes)
every other time it's quick (couple seconds or less)
I can leave the form, use other forms within the app, come back and query is still quick. It's only the first time after initially launching the app.
Any ideas what might be causing this?We have the same application running in 6i client/server DB-9i in production. We are testing the upgraded application that is 10g forms on OAS DB-10g. We don't have the issue in the current production client/server app.
-
Executing query error: System error in program SAPLRRI2 and form REP_A
Hello Experts,
I am facing problem while executing query.
I have activated a query from BI content. The query is activated successfully in development and running successfully in development, so I transported the same into QA.
When I execute this query into quality, automatically debuger opens. After I come out of debuger I get following error message:
" >> Row: 82 Inc: LRRMSU13 Prog: SAPLRRMS
System error in program SAPLRRI2 and form REP_ASSIGN_INITIAL_OPT-01- (see long text)
Error when generating dataProvider "
This query is using some standard structures, which are running successfully in other queries in QA.
what would be an issue?
Regards,
Nirav ShahHi,
Try to regenerate the query in RSRT t.code.
ie) RSRT - give the query name - Generate report ( icon will be there near to Execute + debug) .
After generating the report, (logoff and login )try to execute the query again ..if the above solution doesn't work, check the below OSS notes which may help for you.
OSS notes : 1. 1121766
2. 1117966
3. 1225856
Regards,
Siva. -
Hello,
two of our users get the following error message, when opening two specific reports:
First Report: Cannot find Dimension Scenario.
Second Report: Error executing query: the member null doesn't exist in this application.
Other users can access these reports, and the same users where the problem occurs can access other reports in the same folder.
I set the same rights for me, but i can access the reports without problems.
Somebody encountered the same problem before?Hi there,
I had the same issue a few weeks ago... not sure how it happened but it was related only with my username.
In order to fix it:
1. I created a report which does not require to select the scenario in advance. Try to use the default data-grid that you get when you first create a report for example.
2. When the user runs the report, try to see if he can see the dimension. Do not use the missing dimension on rows or columns. If he can see the dimension, ask him to select one scenario. This will solve the issue.
3. If he cannot see the dimension, try to change the layout of the report.
Regards,
Thanos -
How to implement enter-query , execute-query in Apex Forms
Hi,
I am new to Oracle Application Express. I want to know what is the equivalent of ENTER-QUERY and EXECUTE-QUERY features of Oracle Forms in Oracle APEX? I saw a lot of documentation, but everywhere I found that APEX forms only have 3 database actions, (1) INSERT (2) UPDATE & (3) DELETE.
Does anybody know how we can do QUERY in APEX Forms? (like we do in Oracle Developer Forms).
Thanks in advance.Oracle APEX is a web/ stateless environment. So you do not have the same functionality/ features as in a Oracle Forms environment which is session/state oriented.
You can however achieve functionality similar to Enter Query / Execute Query through other means.
The easiest is to use the Forms with Report wizard. It creates 2 pages, the first one is a report and the other a Form. Clicking on the Report rows takes you to the Form page in Edit mode where as the the Create button takes you to the Form in Insert mode.
If you want to have the enter-query / execute query on a single page it will require significant effort and skills. Try it when you have acquired some more skills in Apex.
In APEX , like any other web application, you have to think in the web paradigm and not client-server. Even Forms 11g is essentially client-server like and is session oriented through the forms applet.
Regards, -
Execute Query not working on custom forms
Hi
After upgrading from 11.5.10.2 and Oracle 9.2.0.5 to ATG6, AD6, oracle 10.2.0.4, Forms 6.0 (Form Compiler) Version 6.0.8.28.0 . The execute query (F11 & CTRL F11) is not working on custom forms. But after tabbing from one column to another column then press CTRL F11 is working.
Please any one help me on this issue.
Thanks
svaHi
I found this error in the trace file. Please help me what is the problem, the data is there in the table.
Out Argument 0 - Type: String Value: ORA-01403: no data found
Executing NAME_IN Built-in:
In Argument 0 - Type: String Value: parameter.G_query_find
Out Argument 0 - Type: String Value: NULL
Executing USER_EXIT Built-in:
In Argument 0 - Type: String Value: FND MESSAGE_CLEAR
MCXQPBULKINVOICEENTER, -1, Built-In, Entry, -1196178744, USER_EXIT
TSE FSERVER_START -1 1407 1279530838565801000
TSE FSERVER_END -1 0 1279530838579778000MCXQPBULKINVOICEENTER, -1, Built-In, Exit, -1196091744, USER_EXIT
Executing COPY Built-in:
In Argument 0 - Type: String Value: Entering app_debug.clear
In Argument 1 - Type: String Value: global.frd_debug
Executing FIND_GROUP Built-in:
In Argument 0 - Type: String Value: APP_DEBUG
Executing COPY Built-in:
In Argument 0 - Type: String Value: Completed app_debug.free.
In Argument 1 - Type: String Value: global.frd_debug
Executing MESSAGE Built-in:
In Argument 0 - Type: String Value: FRM-41003: This function cannot be performed here.
In Argument 1 - Type: Number Value: 121
Unhandled Exception ORA-100501
State Delta:
MCXQPBULKINVOICEENTER, -2, Trigger, Exit, -1190876744, ON-ERROR
##### CTIME STARTS HERE
# 8 - MCXQPBULKINVOICEENTER:BLOCKNAME.RADIO_BUTTON81.1279530839956685000
KEY Execute_query
Error Message: FRM-41003: This function cannot be performed here.
N-ERROR Trigger Fired:
Form: MCXQPBULKINVOICEENTER
State Delta:
MCXQPBULKINVOICEENTER, -2, Trigger, Entry, 181183256, ON-ERROR
MCXQPBULKINVOICEENTER, -1, Prog Unit, Entry, 181304256, /MCXQPBULKINVOICEENTER-3/P58_07_DEC_200909_04_40
Executing COPY Built-in:
In Argument 0 - Type: String Value: Entering app_standard.event. Event is ON-ERROR.
In Argument 1 - Type: String Value: global.frd_debug
Executing ERROR_TYPE Built-in:
Out Argument 0 - Type: String Value: FRM
Executing ERROR_CODE Built-in:
Out Argument 0 - Type: Number Value: 41003
Executing ERROR_TEXT Built-in:
Out Argument 0 - Type: String Value: This function cannot be performed here
Thanks
sva -
What role is required to open and execute query in BE query designer
Hi,
Am new to BE, need to know what role should i be assigned with to open and execute a query in query designer.
OPEN dialobox displays "NO role availabe".
Is this a problem of role assignment or am i missing some steps
thanks
srikanthIN Enterprise portal plz check whether these roles are present or not.
pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.business_explorer_showcase
pcd:portal_content/com.sap.gm.cnt/core/VCRole
pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.bi_showcase
pcd:portal_content/administrator/content_admin/content_admin_role
pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.business_planning_showcase
pcd:portal_content/every_user/general/eu_role
in BW front end , you have to create role with the auth objects S_RS_COMP, S_RS_COMP1, S_RS_MPRO, S_RS_ICUBE auth objects.
include the t-codes if necessary. RSRT you can include.
Hope this would help you. -
Forms Trigger Hirarchy for Execute query operation
Hi
Can anybody tell me in which order triggers are executed in oracle forms
when i press a execute query button.
ON-POPULATE-DETAILS
ON-CHECK-DELETE-MASTER
POST-QUERY
i want to write a code after completion of all the operations of execute_query
requirement is after excute_query i want to append few more record in multiline detail block of master-detail relation.
where should i write this code.
regdsPOST-TEXT-ITEM
POST-RECORD
PRE-QUERY
PRE-SELECT
POST-SELECT
POST-QUERY( x times )
ON-CLOSE
PRE-RECORD
PRE-TEXT-ITEM
WHEN-NEW-RECORD-INSTANCE
WHEN-NEW-ITEM-INSTANCE
Francois -
D2k Forms did not execute query.
In D2k forms 4.5 Support. In Application "WHEN BUTTON PRESSED" event written code as "do key(EXECUTE QUERY)". if i gives db click on query button it did executed all records from oracle 8i database. only 15,16,17,18 auto generated numbers(i think created sequence for auto generated numbers) only. Please guide me how to find and solve this problem.
You should post this thread to the Forms forum...Here it is Forms
-
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
Maybe you are looking for
-
How can my family member use their iTunes credit for a purchase when part of family sharing
I've set up family sharing with my husband and children. They all have iTunes gift cards with credit on their accounts. I am wondering how they are able to make purchases in the app store using this credit rather than the family share credit card.
-
Issue after downloading excel file: SYLK format
Hi experts, I have downloaded an excel file through 'GUI_DOWNLOAD'. When I open the file, I get a pop up message which says: "Excel has detected that mg.xls is a SYLK file, but cannot load it. Either the file has error, or it is not a SYLK file forma
-
Customizing 'Base' Installation
I followed the Arch Wiki last night for fun since it's the 1st time I've attempted to install since they've removed the installer framework menu. So I got to this section where I begin to install the 'base' package group on my new system: pacstrap -
-
How to creat pdf documents with printing restrictions in Aperture
Hi, I wondered if it is possible to create a pdf document made up of 9-12 image per page contact sheets, to send to clients that restricts the client to open and view only i.e no printing allowed. Photoshop allows this, however i would like to create
-
Edge terrible for YouTube. Here's another solution to get good YouTube
Not the best but this actually turns up better YouTube vids. Go to iTunes and subscribe to BestOfYouTube (Video) podcast. iTunes will download as many of the vids you chose and then when you sync your iPHone will have the videos ready to play in the