|
|
|
|
|
Re: Save > Delete > Save > Insert [message #510045 is a reply to message #510043] |
Thu, 02 June 2011 05:22 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
You think so? Check in the property pallette!
Your insert wasn't firing when you expect because commit doesn't cause forms to apply changes to datablocks to the DB. Commit_form does.
|
|
|
|
|
|
|
|
|
Re: Save > Delete > Save > Insert [message #510245 is a reply to message #510243] |
Fri, 03 June 2011 03:52 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
That really doesn't tell us much.
What datablocks do you have?
What tables are they based on?
What's their database property set to?
Are there relationships defined between the blocks?
Are there other items in the datablock the three items above belong to?
What trigger is the commit_form in?
|
|
|
|
Re: Save > Delete > Save > Insert [message #510248 is a reply to message #510246] |
Fri, 03 June 2011 04:06 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
faithima wrote on Fri, 03 June 2011 10:00
1. Datablocks is came from the table in database. (Is there kinds of datablocks?)
I'll rephrase - how many datablocks do you have? And yes there are other types, you can base blocks on procedures.
faithima wrote on Fri, 03 June 2011 10:00
2. Don't understand what you mean. sorry.
You know that blocks are based on tables in the DB. Which tables are your blocks in your form based on. That's a really simple question.
faithima wrote on Fri, 03 June 2011 10:00
4. None
That might well be the problem.
faithima wrote on Fri, 03 June 2011 10:00
5. Yup! Another table.
That would mean you have a datablock based on two tables.
Flex, description and qty are in a datablock - are there any other items in that datablock? And what is the block called?
faithima wrote on Fri, 03 June 2011 10:00
6. On the SAVE Button.
Post the full code - use code tags.
EDIT: added some blank lines
[Updated on: Fri, 03 June 2011 04:09] Report message to a moderator
|
|
|
|
Re: Save > Delete > Save > Insert [message #510254 is a reply to message #510252] |
Fri, 03 June 2011 04:32 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
faithima wrote on Fri, 03 June 2011 10:28
5. Yup! Another table.
That would mean you have a datablock based on two tables.
Flex, description and qty are in a datablock - are there any other items in that datablock? And what is the block called?
>> buyoff_dtl. it also came from database.
And is buyoff_dtl being inserted correctly?
faithima wrote on Fri, 03 June 2011 10:28
6. On the SAVE Button.
Are you repeating what I say for a reason?
Post the code
|
|
|
|
|
|
Re: Save > Delete > Save > Insert [message #510258 is a reply to message #510257] |
Fri, 03 June 2011 04:52 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Well, 9-blocks-form is quite a complex form, so I thought that you'd rather - if possible - try with something easier, to learn how Forms work, how it does certain things, what features it offers by default. Maybe you are coding something that you shouldn't (so, if you let Forms Wizard do that for you, you wouldn't even have those problems).
Is there nobody there, who knows Forms? Can't you ask him/her to assist?
Now it is kind of difficult to debug what we don't see. Even if we did, we don't have your tables, your data, so ... quite a stalemate situation. I'm afraid it will take considerable time to fix what is wrong.
|
|
|
|
Re: Save > Delete > Save > Insert [message #510260 is a reply to message #510257] |
Fri, 03 June 2011 04:57 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Do you actually understand what I mean when I say post the code?
The save button has a when-button-pressed trigger, that trigger contains some code.
I want you to copy and paste that code here so we can see it.
Quote:
Yup! When I do the save > delete > save.
It inserted correctly.
All the data? some of the data?
|
|
|
|
Re: Save > Delete > Save > Insert [message #510266 is a reply to message #510263] |
Fri, 03 June 2011 05:16 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
In one of your previous messages (the one with a screenshot), you said that FLEX, DESCRIPTION and QTY values are not saved. Which block do these items belong to? Is it REWORK or QASYS_REWORK?
The very first message in this thread names all items but those three, so *maybe* your code misses
-- This is what you have:
:QASYS_REWORK.area_id := :rework.area_no;
:QASYS_REWORK.area_desc1 := :BUYOFF_DTL.area_desc;
:QASYS_REWORK.pt_no := :rework.mo_number;
:QASYS_REWORK.date_created := sysdate;
:QASYS_REWORK.flex_value := :rework.flex_value1;
:QASYS_REWORK.flex_value_desc := :rework.description;
:QASYS_REWORK.qty_rework := :rework.qty;
:QASYS_REWORK.qa_no := :temp.qano;
-- This is what you might need to add:
:QASYS_REWORK.FLEX := :REWORK.FLEX
:QASYS_REWORK.DESCRIPTION := :REWORK.DESCRIPTION;
:QASYS_REWORK.QTY := :REWORK.QTY;
-- Finally, commit:
commit_form;
Or, if that's not the case, did you check the right table? Maybe these items (FLEX, DESCRIPTION, QTY) belong to another table?
[Updated on: Fri, 03 June 2011 05:16] Report message to a moderator
|
|
|
|
|
Re: Save > Delete > Save > Insert [message #510279 is a reply to message #510268] |
Fri, 03 June 2011 06:52 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
I would assume the screenshot block is QASYS_REWORK. The code populates all the items in the block that aren't on screen.
However that code only populates the items in the current record in the block.
It's a multi-record block.
So if you've entered 10 records and then click the save button it'll only assign values to those items in the 10th record.
It'll leave those items blank in records 1-9.
Assuming I'm right all the code that assigns values to items in the QASYS_REWORK block should be moved from the when-button-pressed to the pre-insert trigger on that block.
|
|
|
|
|
|
|
|