Insert button NavigationBar TooManyObjectsException
In a Master-Detail Panel I insert two NavigationBar's (one for the master and one fot the detail view). Each of these views (connected through a view linke) join two or three tables. While trying to insert a record with the Button from the NavigatorBar, I get:
(oracle.jbo.TooManyObjectsException) JBO-25013: Too many objects match the primary key
Why?
And how can I define in which table within a View records can be inserted?
thanks.
Dear Fabio,
Whjat do u mean by insert button. The add mode of the form??
Regards,
Kit
Similar Messages
-
Requerying a report after an insert button is presses on a form
We have created an On-line Registration system using Portal. A student runs a report displaying courses from which they can register from to add to their profile.
We would like to have the report requeryed after the client has clicked on the insert button on the form (that was called from the report).
Otherwise the student stays at the insert screen and need to use the browser back button. Does any one have a suggestion or example which they wouldn't mind sharing to help us overcome this problem.
Thanks PaulPaul,
You may want to search the Oracle9iAS Portal Applications forum for an answer to your question, but to give you a pointer.
In your form, you have a textbox called "Upon Successfull Submission" .. you would call your report here. Most likely using a redirect procedure or just calling it directly.
You will definitely be able to get more information from the other discussuion forum though.
Sue -
I cannot send email in hotmail account and insert buttons dissapear after 4 seconds
I am able to receive emails in hot mail account but cannot send.
This has been the case for the last two days.
Have the same problem in IE.
Noticed insert buttons disappear when I click on new
Same in IEEnded up calling my service provider to figure it out. They couldn't but again gave me all the perameters to enter into an account. I had to cancel the account on my phone and set up a new one. I had to enter the information more than once before the phone would actually save it. Lucky me, it did not lose all the emails I had stored on the phone. No help from Apple!
-
How to send a predefined email after clicking on an Insert button in a Form?
Hi,
I created my form ( three fields) where I enter a three values.
I want an email be sent every time new values are entered and the insert button clicked.
Do you know a way on how to do it please?
Thanks
Khaled.Hi,
I do not know of a way within Portal to automatically send an email, but the database has a utility (utl_smtp) that will allow you to do so very easily. You can use Portal to insert your data and then put a trigger on your table that fires after the data is inserted that calls a procedure that will send the mail.
Here is an example of a procedure that I have used to send mail (you can get all of the info on utl_smtp in the Oracle docs). I have a Portal form that allows the user to input three values and once they click 'insert' and the data goes into the table, I have a trigger that fires 'after insert' and runs this procedure:
PROCEDURE send_register_mail (sender in varchar2,
email varchar2,
date_of_class date)
IS
mailhost VARCHAR2(30) := 'my.mailserver.com';
mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, email);
utl_smtp.rcpt(mail_conn, '[email protected]');
utl_smtp.open_data(mail_conn);
utl_smtp.write_data(mail_conn, 'Subject: Platform Training registration request'||utl_tcp.crlf||'Content-Type:text/html;'||utl_tcp.crlf||utl_tcp.crlf);
utl_smtp.write_data(mail_conn, sender||' would like to attend the POC training scheduled for '|| date_of_class);
utl_smtp.close_data(mail_conn);
utl_smtp.quit(mail_conn);
EXCEPTION
WHEN OTHERS THEN
-- Handle the error
htp.p('There was an error processing your registration. Please contact the site administrator');
END;
Hope this helps.
-melissa -
I am using Firefox to fill in forms in our library cataloging system, InMagic Genie. With IE, I can toggle back and forth from insert to overwriting text with the INSERT button, but it has no effect in Firefox.
Firefox doesn't support overwrite and is always in insert mode.
-
Hi all,
Can any body please tell me that in ALV grid, how can i get the drop down for insert button in the tool bar with options "Add 1", "Add 2" ... inserting 1, 2 or 3 lines??
Thanks in advance,
Kulwant1) define following macro
DEFINE toolbar_funcs.
CLEAR ls_toolbar.
MOVE 0 TO ls_toolbar-butn_TYPE.
MOVE &1 TO ls_toolbar-function.
MOVE SPACE TO ls_toolbar-disabled.
MOVE &2 TO ls_toolbar-icon.
MOVE &3 TO ls_toolbar-quickinfo.
APPEND ls_toolbar TO e_object->mt_toolbar.
END-OF-DEFINITION.
2) in the class definition
EVENTS: user_command.
METHODS:
on_user_command
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING
e_ucomm
sender,
on_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING
e_object
e_interactive.
3) define the handlers
SET HANDLER z_object->on_user_command for grid1.
SET HANDLER z_object->on_toolbar for grid1.
4) in the implementation part code the functions you've given your buttons
for example
METHOD on_user_command.
break-point 1.
CASE e_ucomm.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'EXCEL'.
CALL METHOD me->download_to_excel.
WHEN 'SAVE'.
WHEN 'PROC'.
CALL METHOD me->process.
WHEN 'REFR'.
CALL METHOD me->refresh.
ENDCASE.
ENDMETHOD. "on_user_command
In the toolbar method --use YOUR buttons and functions
Using the macro in step 1) means you have to write a lot less code. Some people don't like macros but in this case we are using it for pure code generation and not complex processing so it's (IMO) still OK.
METHOD on_toolbar.
customize this section with your own Buttons
When a button is pressed method ON_USER_COMMAND is entered
toolbar_funcs 'EXIT' icon_system_end 'Click2exit'.
toolbar_funcs 'SAVE' icon_system_save 'Savedata'.
toolbar_funcs 'EDIT' icon_toggle_display_change 'Edit data'.
toolbar_funcs 'PROC' icon_businav_process 'Process'.
toolbar_funcs 'EXCEL' icon_xxl 'Excel'.
toolbar_funcs 'REFR' icon_refresh 'Refresh'.
ENDMETHOD. "on_toolbar
Change the toolbar button type to what you want. It's all in the ALV documentation. The code above uses standard rather than drop down buttons but the process is the same.
The permitted values and types can be found by looking at the values for domain TB_BTYPE.
I think you want 2 (Menu type button).
Change this line in the macro
MOVE 0 TO ls_toolbar-butn_TYPE.
For a menu set the type to 2.
Include the menu handler in the class definition
handle_menu_button
FOR EVENT menu_button OF cl_gui_alv_grid
IMPORTING e_object e_ucomm,
SET HANDLER z_object->handle_menu_button FOR grid1.
Add your choices when you click the button
METHOD handle_menu_button.
handle own menubuttons
IF e_ucomm = 'DETAIL_MENU'.
CALL METHOD e_object->add_function
EXPORTING fcode = 'ADD1'
text = text1.
CALL METHOD e_object->add_function
EXPORTING fcode = 'ADD2'
text = text2.
ENDIF.
ENDMETHOD.
The choices (function codes from your menu) are still handled in the ON_USER_COMMAND.
Cheers
Jimbo -
ALV Grid default values for new rows added with Add/Insert buttons
Hi!
Help, please, to find a way how to set default values for new rows added with Add/Insert buttons in
ALV Grid.I have found salution:
ALV Grid u2013 Insert row function
Sometimes we need to assign some default values when we create a new row in a grid using standard ALV Append row button. In our scenario we will see how to assign default values to Airline Code (CARRID), Flight Connection Number (CONNID) and Flight date (FLDATE) when a new row is created. To do that we need to handle DATA_CHANGED event in the program like mentioned below.
Definition of a class:
Code:
CLASS lcl_event_receiver DEFINITION
CLASS LCL_EVENT_RECEIVER DEFINITION.
PUBLIC SECTION.
METHODS:
handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed
e_ucomm.
ENDCLASS. "lcl_event_receiver DEFINITION
Implementation of a class:
Code:
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
METHOD HANDLE_DATA_CHANGED.
DATA: dl_ins_row TYPE lvc_s_moce. " Insert Row
FIELD-SYMBOLS: <fs> TYPE table. " Output table
Loop at the inserted rows table and assign default values
LOOP AT er_data_changed->mt_inserted_rows INTO dl_ins_row.
ASSIGN er_data_changed->mp_mod_rows->* TO <fs>.
loop at <fs> into ls_outtab.
ls_outtab-carrid = 'LH'.
ls_outtab-connid = '400'.
ls_outtab-fldate = sy-datum.
MODIFY <fs> FROM ls_outtab INDEX sy-tabix.
endloop.
endloop.
ENDMETHOD. "handle_data_changed
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
Register the events to trigger DATA_CHANGED event when a new row is created.
Code:
CALL METHOD OBJ_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
CALL METHOD OBJ_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED. -
How to Commit before Insert Row when Press Create Insert Button ?
Hi all;
I'm Using JDev 11.1.1.2.0
How to Commit before Insert Row when Press Create Insert Button in ADF11g?
<af:commandButton actionListener="#{bindings.CreateInsert.execute}"
text="CreateInsert"
disabled="#{!bindings.CreateInsert.enabled}"
id="cb8" />
best regards;You need to do a custom method eather in managed bean or in Application module to do that.
in managed bean it would be something like:
public void CommitAndInsert(ActionEvent actionEvent) {
OperationBinding opCommit = ADFUtils.findOperation("Commit");
opCommit.execute();
OperationBinding opCreateInsert = ADFUtils.findOperation("CreateInsert");
opCreateInsert.execute();
In page bindings Commit and CreateInsert must exist
then the button actionListener will be
<af:commandButton actionListener="#{backing.CommitAndInsert}" -
Usage of insert button in Std ALV toobar (OOPs)
Hi Experts,
I have developed an ALV(oops) with cl_gui_alv_grid. I have the std toolbar and do NOT want to disable it.
what i need is when i click on insert button in std toolbar, i need to make a field editable.
The func code for insert is &LOCAL&INSERT_ROW ( see in e_object->mt_toolbar).
I am unable to trap the func code. i tried to make use of this func code iand use it in the handle_toolbar method (e_ucomm). Its not going into debugging mode even when i set break point.
i want to write code as:
when '&LOCAL&INSERT_ROW'.
further validation.
Can someone help me how to get the sy-ucomm and do my validation?
Thanks
DanHi
You can achieve this by defining Style Table for Cells.
For eg:
Begin of <str>
include structure mara.
celltab TYPE lvc_t_styl,
end of <str>
data: lt_tab type table of <str>,
wa like line of lt_tab,
lt_celltab TYPE lvc_t_styl,
ls_celltab TYPE lvc_s_styl.
LOOP AT lt_tab INTO wa.
IF matnr IS NOT INITIAL.
ls_celltab-fieldname = 'MATNR'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_celltab INTO TABLE lt_celltab.
endif.
INSERT LINES OF lt_celltab INTO TABLE ls_profile_tabval-celltab.
endloop.
Thanks
Nisha -
Record inserting twice on insert button trigger
hi developers,
I am designing a simple form whilch contains the datablock in tabluar form and showing the data from the table to which the data block is connected...
i have an button INSERT ....when clicking the insert button the record should be inserted....i wrote the trigger as WHEN - BUTTON-INSERTED
insert into anand(empid,empname) values(:anand.empid,:anand.empname);
commit_form;
both data block and table name is anand oly.
when i trigger the insert button the record is inserted twice.....
how to resolve this issue....Hi,
You can set the Current Record Status to QUERY_STATUS before calling COMMIT_FORM built-in. So the code will be
insert into anand(empid,empname) values(:anand.empid,:anand.empname);
SET_RECORD_PROPERTY(:SYSTEM.CURSOR_RECORD, 'ANAND', STATUS, QUERY_STATUS);
commit_form;Hope this helps.
Regards,
Manu. -
I need insert buttons in html table to display them well aligned.
I have a idea :
I created html in region. The html contain <tab ...></tab>
Is possible insert button in the table?When you create a button there is an option to use an html button or a button displayed among items. Choose the latter.
Anton -
Typing, weird problem like an insert button is on...HELP please!
I can't even type this...i need computer help. whenever i type it acts like an insert button is on. it will highlight and erase what im typing every so often... it will select things. I thought it could be me touching the mouse pad area but it is not. it took me forever to type this. please help! so frustrated!
No, it should be off. Try a PRAM rset, but let it chime five or more times....
http://docs.info.apple.com/article.html?artnum=2238 -
Problems with the "INSERT" button.
Hi,
I have a problem in my homework. I am required to do the following:
'original numbers' array contains zeros. Let LabVIEW fill an array "original numbers" by random integers from 10 to 90 at a rate 1 number/0.5 seconds by replacing each zero at a time from top to bottom. (DONE)
user fills in 10numbers in an array 'numbers to be probably inserted'. Then the user decides if he needs to change a generated number that he doesn't like by changing the 'Insert' array.
Then he presses the INSERT button and a resulting array would appear containing the elements the user changed......
This video might clarify:
http://www.youtube.com/watch?v=dDXo2ABqNM4
The problem I am facing is the INSERT button. In the video, the moment it is switched the program will continue to the last part.
I am attaching the vi. I think there are no logical mistakes in the program except the INSERT case structure.
Thank You.
P.S. The version is LabView2010 ; I'm getting error trying to save to previous versions sorry.
Solved!
Go to Solution.
Attachments:
INSERT.vi 18 KBA.A.A. wrote:
What does it mean to disable auto-indexing?
I didn't understand why we used the reshape array palette. What are the dimensions of the input and the output? Very nice way how you made a length 10 zero array. (i'll use that when i figure the solution of the dimension problem.)
Did you use the 100ms wait in order not to affect computer performance or for other reason?
How where you able to connect the 'changed numbers' array to Not Equal Palette?
From where did you get the "replace" button? I think my "insert" button does the oppositeof what it should do.
Your code sitll has major flaws. Your questions are very basic and I recommend to do a few tutorials.
If you wire an array across a loop boundary, the tunnel can have two modes (plain (solid square) or autoindexing (contains a small set of square brackets)). In your case, you are autoidenxing the 1D array, creating a 2D array (double-line) at the output of the first loop. You are generating 10x too much data! (create an 10x10 indicator on the 2D array to see what you are actually doing!). You can right-click a tunnel to switch between indexing modes. A plain tunnel transports the array data unchanged. An autoindexing output tunnel, creates an array with a higher dimension, in your case a 2D array from a 1D array with one new row per iteration. If you autoiindex a scalar, you get a 1D array with one element per iteration. An autoidexing input tunnel does the reverse. If you wire a 1D array to a FOR loop using autoindexing, you get a scalar per iteration and the FOR loop will stop once the array runs out of elements. Is it equavalent (with some important differences) to wiring without autoidenxing, then using "index array" with the index wired to [i] as you currently do. In your case, you chould get the 1D array from the shift register of the first loop, it has all the information(!), and disable autoidexing at the boundary of the second loop and the outcome would be the same, except you use only 10% of the memory.
Once you are autoidexing at a loop boundary, a FOR loop iteration count will be determined by the size of the smallest autoindexing array. This would be a problem if you later want to change the code to operate on e.g. 20 elements, because the other two arrays in my code would force the loop to stop after 10 iterations. "Resize array" can be used for padding/trimming arrays and in this case we are forcing them to be the lenght on the main array to ensure that the FOR loop does not stop prematurely. In your case, the replace and switch arrays are empty by default, so the loop would not spin at all unless you would enter some values. "resize array" brings them up to size.
Yes, you need a small wait either inside the other case or elsewhere in the while loop. Without a wait, the basically empty loop will spin millions of times per second, consuming all CPU in the process while doing nothing. No human can click a button with that kind of time resolution, so a 100ms wait is not noticeable, but will drop the CPU use to negligible levels. Your computer has dozens of processes running at any given time. Imagine how well it would work if all programs would consume all CPU they can possibly get?
I am comparing two arrays, and the output will be a boolean array. You are only comparing two scalars and you won't get an array. You also don't need the "AND", because if the values are different it has to be true anyway. In your case you would need to carry a boolean array similar to the number array, replacing elements as you go.
A button is a button is a button. There should be no difference. You can change the label, boolean text, default value, and mechanical action to match your requirements.
A.A.A. wrote:
I have done so to initialize the arrays full of zeros yet the way you did it way easier. How did u initialize them to zeros?(from where did you get the palettes? I have attached a picture clarifing my question.
These are local variables. You don't need to find them in the palettes. Simply right-click a terminal and "create local variable". Voila!
(Local variables can be used to read from an indicator or write to a control. However, because they break dataflow, you can generate dangerous race conditions. They also force extra data copies in memory. Don't use them like "variables" in text based code. Except for initialization and user interface interactions, they should be used sparingly and are rarely needed. In principle, my code has a theoretical race condition because the order of operations is not determined between the three independent code sections. For example if the initializion would happen after the second loop executes, you would get an unexpected result. It will never happen in this particular case, but in other scenarios it could be a problem.)
LabVIEW Champion . Do more with less code and in less time . -
I went to insert button hit counter. It shows on iweb, but it won't publish
I went to insert>button>hit counter. It shows on iweb, but it won't publish
Features Unavailable When Publishing to a 3rd Party Server:
◼ Password protection
◼ Blog and photo comments
◼ Blog search
◼ Hit counter
OT -
Keyboard problems with insert button
Hi, I'm having problems wih the insert button. It doesnt work when i press to activate it. However, this button is also used with the function key to toggle scroll lock which works. What is the problem? Is my labtop defective? I also have this problem with my desktop keyboard. Is it some kinda setting that I disabled because it worked on my desktop keyboard a few days ago and I don't remember setting any different preferences.
My labtop is the the U550. It is 2 days old.Quote from: mild0d on 21-July-12, 03:01:44
Has anyone had any problems with their keyboard? I bought a gt60 back in april. Everthing with the laptop has been great except for the "W" key. It works fine typeing but in a game and trying to go forward it will stop working and I will have to repress. I also noticed that if I have just used the keyboard and stop using it for a minute it will make this crackling sound. It has freaked me out a couple times.
Regardless, if it was any other key I would have had no problem but it is pretty much my main gaming key. I RMA'ed through msi and sent it off tuesday. Had anyone had any experience with MSI laptop rma service? I am just wanting to know what type of turn around time i will have?
Having the exact same issue with my GT60 :-(
Maybe you are looking for
-
IMac G4 flat panel with slow mouse and ever-whirring fan
hi there - my lovely iMac has treated me well for some time now, but gradually over the course of many months, it decided that it will not stop running it's fan, even when it seems cool it the touch and the room is cool. The noise is loud enough to d
-
After my third day of iOS5 songs stopped playing; sometimes they would randonmly skip, sometimes I couldn't open them at all. It appeared as if it was playing but no sound came of it. (Videos and other apps with sound worked well). I searched here bu
-
Importing - No Video, Audio Only
I am trying to import footage from my Sony HDR-HC3 HDV 1080i using iMovie '08 on a machine running Leopard. On the "Import From Camera" screen, the on-screen controls work (e.g. play, stop, FFWD), but no picture shows-up on the screen. Instead, I get
-
Hi, Kindly advise on the queries to add a additional AGate node. We have 4GB of Physical Memory and our process is not completely utilised but the AGate stops responding when the MaxThreads goes to 0. So we have analysed and decided to add a addition
-
Safari is not on my new iPhone anywhere?
Just got a new iPhone and noticed safari is gone. Not sure if it was ever there? I've searched for it everywhere.... In the settings, with suri - who tells me she can't open any URL- is this a hardware or user error? Anybody?