Update of Varchar2-PrimaryKey in master / detail
Hello
I use a form master / detail with a primarykey as varchar2 in apex 4.2.
When you try to update the primarykey value in the detail form, I get a ORA-01403: no data found.
Is there a way to avoid this problem easily?
Thanks in advance...
In my humble OPINION, easist way... to serve another PK column and make it editable and free to the top of the current "PK" column for editing and apply own forced him (Unique, etc.)
the column you are trying to update in the form of details and use as PK is a bad choice if you need to update.
Tags: Database
Similar Questions
-
Form master / detail apex 5 tries to update the lines of details without apparent change
A form master / detail of Apex default 5.0 creates buttons back and forward on the main table. When you move between records, the detail region launches a message: update 0 row (s), 0 or the inserted rows.
Glance in occasional of the user, it will look like a mistake: I, what has changed and why it has not been saved?
If nothing has changed, why is a MRU statement update being generated?
How do I remove this behavior? Is this a bug?
You can see in https://apex.oracle.com/pls/apex/f?p=74308:LOGIN_DESKTOP:113903018138704:, the application of MasterDetail Claim_Charge. Credentials are of assistance/Viewer.
Thank you!
Hello
Create a new hidden element Px_RUN_MRU and the value of
Source used "Always replace the value that exists in the session state."
Source of Type ' static assignment (the value corresponds to the source attribute) ' and
Value of source or phrase "N".
Then create new PL/SQL process for tabular and use the code
if :Px_RUN_MRU = 'N' and :APEX$ROW_STATUS IN('C', 'U', 'D') then :Px_RUN_MRU := 'Y'; end if;
Make sure that this process is captured in the form of process MRU.
Then change tabular MRU to love affection
(:request like ('SAVE') or :request like 'GET_NEXT%' or :request like 'GET_PREV%') and :Px_RUN_MRU = 'Y'
Kind regards
Jari
-
Hi all
I implement updated for logic with master-detail page.
My expectations:
Both master Vo and Vo of detail is executed with Set whereclause and line master and detail gets displayed.
The two actions are required in the application process.
Result:
Executing query (even after call run the query for master and detail VO), master line get appears. Detail line is not displayed,
However when the form application process is called (by clicking on the button Save), detail lines gets displayed.
My logic to query example: (your have VL and EOs have AO)
PR:
Configuration where clause;
XXAM.getXxcfirIcfUpMasterVO1 () .executeQuery (); XXAM.getXxcfirIcfUpDetailVO1 () .executeQuery ();
PFR:
The logic of adding new line-to-line in detail.
Save button.
Is there a way to show line main and details while that Page gets loaded through the application process and still not break the relation ship master detail since must be made on the update page.
Thank you and best regards,
Gauthier
Hello
See my post on master / detail to OFA:
http://anilaltunkan.com/en/Oracle-3/Oracle-application-framework-Oracle/OAF-master-detail-page/
Kind regards
Anil
-
ADF:how update attribute of link seen in master-detail relationship.
Hi all
I use jdev 11.1.1.5.0 version.
I created a form master / detail using view link. My requirement is the Key attribute update sacrificed on Master table and same attribute on table automatically put details far because it fits on the link attribute.
but his past when I change attribute link view main table, detail line stop display table.
Thanks in advance
Manish
Your link on the association and for this assoc basic display, check the key attributes of the Cascade Update:
https://blogs.Oracle.com/raghuyadav/entry/adf_entities_association_-_Cas
-
Master / detail. Third do level not updated, if the second tier is not returned
We have three level model master / detail.
The first and the second level is 1 to 1
The second and third are 1 to *.
The second level is just an empty container from now and should not be displayed to the user. But it takes to get the first level to the third level.
If make us only the first and third level tabulated, the iterator behind the third level table is not correctly being updated, actions.
If we make on the other hand, the second-level table, the iterator for the third level table IS updated, to action - such as changing the current line.
We worked arround by 'hide' the second table level in a group separator collapsed. Is there another way to get arround this problem?
Top-level iterator:
< iterator lie = "First" RangeSize = '25'
DataControl = "AMDataControl" id = "FirstIterator".
ChangeEventPolicy = "ppr" / >
Second level iterator:
< iterator lie = "Second" RangeSize = '25'
DataControl = "AMDataControl" id = "SecondIterator".
ChangeEventPolicy = "ppr" / >
Third level iterator:
< iterator lie = "Third" RangeSize = '25'
DataControl = "AMDataControl."
ID = "Third" ChangeEventPolicy = "ppr" / > "
Not sure, but maybe you can use custom (for the first table) table selectionListener, I you must refresh the second iterator of pageDef...
-
Updating of the master/detail does not work after the failure of the validation
After validation of the judgment of the further processing of a page page page master detail, I get the error message Oracle depending on the display of the detail portion:
< code >
ORA: 01445: cannot select ROWID, or sample, a view of join without key preserved table.
ORA-06510-PL/SQL unhandled exception defined by the user.
< code >
Clues as to why this might happen? The master of the page displays fine as well as the validation error message personalized appropriate. It's just part of detail (from SQL-based report) that is causing the problem. I use either a ROWID.
Thank you!
Just an info for all those who may have this same problem in the future. I corrected the error and it had nothing to do with the ROWID or views or something like that. Under the section of Page rendering when you set the definition of the region in the source section, I included the "order by" clause in my SQL statement. This was the cause of my ORA-01445 error! When I removed the clause of the definition of the source, and instead included in the attributes report by checking the box of the appropriate column sorting (which allows the apex generate so for me), the error has disappeared! The error message Oracle NEVER would have given me a clue to what caused the error. I joined just thinking 'what if I take the order by clause. What's a flukey fix!
-
Problem with page validation APEX_APPLICATion master detail. Help!
I'm having a problem with the Apex_Application.g_fxx data structure. I'm trying to validate the lines in my page master detail and need to use apex_application.g_f10 as the name of the variable inside the HTML data source electricity. The name of the item I need is "f10" because it matches the database column "status" on my page. I'm trying to validate that all the detail items have the same status, or an error is reported. I use the following PL/SQL block that returns a Boolean value:
< code >
declare
l_first_value varchar2 (4000);
Start-f10 = column PO_STATUS of PO_DETAILS table on a part as a table on the page.
l_first_value: = apex_application.g_f10 (1);
because me in 2... apex_application.g_f10. COUNTY
loop
If l_first_value! = apex_application.g_f10 (i)
then
Returns false;
end if;
end loop;
Returns true;
end;
< code >The HTML data that I is not intended to "f10" are the following:
< code >
< td headers= "Status" class= "t20data" >
< label for= "f10_0000" class= "hideMeButHearMe" >status< /label>
< Select name="f10" id="f10_0000">
< option value= "" selected= "selected" >make a selection< /option> ""
< option value= 'APPROVED' >APPROVED< /option>
< option valeur= « FERMÉ » >FERMÉ< /option>
</ Select >
< entry type="hidden" name="f02" value="" id="f02_0000" />
< entry type="hidden" name="f03" value="30427" id="f03_0000" />
< entry type= 'hidden' id= "fcs_0000" name= "fcs" value= "2158A9B101842608F4CA966C0BC1433D" >
< entry type="hidden" id="frowid_0000" name="frowid" value="" />
< entry type="hidden" id="fcud_0000" name="fcud" value="D" />
</ td >
< code >
So I do not know why there could be a problem when used to work before this validation. The PL/SQL block takes the first line of F10 data and compare it to successive lines. If the data is not equal, then an error occurs and the user is prompted to adjust the data.
It doesn't work anymore, although I checked and the status are still of points in F10.
I left mouth gaping. I do not use an official page master detail previously. I used two separate front pages: one for the header and one for show master detail. I've updated the page for the treatment of the more fluid user. I think that even if the data structure would be the same, but maybe I'm wrong.
Any ideas?
Thank you!Thank you to reproduce the problem so overall. Note that if you will share your workspace in this way you need to change your username to something else than a direct email address and don't use not the actual data for your test cases. Create a guest account to developer without administrator privileges to work space for the members of the forum to use.
Validation in this app is coded to use a different picture of the description in this thread. Above, you have identified the point like g_f10 dashboard, but the validation code is using g_f09:
declare l_first_value varchar2(4000); begin -- f09 = PO_STATUS column of PO_DETAILS table l_first_value := apex_application.g_f09(1); for i in 2 .. apex_application.g_f09.COUNT loop if l_first_value != apex_application.g_f09(i) then return false; end if; end loop; return true; end;
Therefore (thanks to instrumentation code added), the validation is running by using the values of the previous column, which was be the one that I have changed according to your instructions:
0.09114
0,00018
... Posting type "Status check IN." -: FUNC_BODY_RETURNING_BOOLEAN
4
0%
0.09132
0,00049
... Run the statement: select count (*) in the sys.dual where exists (Select 1 from PO_DETAILS where PO_ID =: P230_PO_ID)
4
0 g
0.09181
0,00015
...... Result = true
4
0%
0.09196
0.00573
... Run the statement: declare function x return boolean is begin declare
l_first_value varchar2 (4000);
Start
-f09 = PO_STATUS table PO_DETAILS column
l_first_value: = apex_application.g_f09 (1);
apex_debug.message ('g_f09 (1): %s, l_first_value);
because me in 2... apex_application.g_f09. COUNTY
loop
(apex_debug.message('g_f09(%s): %s, i, apex_application.g_f09 (i));
If l_first_value! = apex_application.g_f09 (i)
then
Returns false;
end if;
end loop;
Returns true;
end;
Returns a null value. end; begin wwv_flow.g_boolean: = x; end;
4
28%
0.09769
0.00005
g_f09 (1): TEST2
4
0%
0.09773
0.00010
g_f09 (2): TEST
4
0%
0.09783
0,00003
...... Result = false
4
0%
0.09786
0.00004
...... Does NOT pass
I created a new liquidation which uses the correct column, but at some point the validation passes and data, so I didn't get a chance to conduct tests.
-
Master detail form based on single Table
Hi all.
I have a table like
daily_transaction
(
TRANSACTION_DATE DATE,
LINE_ID NUMBER,
ITEM_CODE VARCHAR2 (10),
NUMBER OF BALANCE,
DESCRIPTION VARCHAR2 (500)
)
Now, I want to build form master detail
master form have only transaction Date all in the form of retail have row id, item, balance, date of transaction, description code
I join date of the main transaction with the date of the transaction in detail
now the problem is when I enter two archives in the form and save it, it save 3 record in the table, an empty line except transaction date
Please guide me how to save two archives:
Secondly when I update / edit date of master on the date of the operation blank line change, how do I update details formIn order to perform an update on a view - it must be a "editable view. You try to update the MASTER block (based on the view)? Otherwise, make sure that you change the property update block allowed to 'No' as it is default to 'yes '. If you do not update the MASTER block, make sure that your point of view is "can". Read this article from Tom ask article on editable views. http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:5226026422731.
Craig...
-
Hallo,
I have a page with 2 legs and they both contains an af:table created by dragging an instance of VO in the user interface.
The 1st tab uses a master VO while the 2nd uses a VO detail.
Between 2 your, there is not a link of VO master / detail.
Opening Details tab I update the secondary table by calling the method ExecuteWithParams of the detail VO instance (in a managed bean).
I would now like to generate a report that loop on the master table and that, for each line of master:
- He writes in the report;
- loops of registration of details (which are based on the master record) and also writes the report.
Could you kindly suggest me which is the best way to achieve that through a code to write in a managed bean?
Here I am interested how do to loop through the data, not in how to write the report.
Thank you
Federico
Yes it will affect the selected line. If you want to ignore try using this code
DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("DepartmentsView1Iterator"); ViewObject vo = iter.getViewObject(); for (int i = 0; i < vo.getEstimatedRowCount(); i++) { Row r = vo.getRowAtRangeIndex(i); System.out.println("DeptId= " + r.getAttribute("DepartmentId")); }
-
Master-detail functionality between the regions of PL/SQL and IR possible?
4.2.1
THM 2
Hi all
We have two regions in a page. The upper region is a region of PL/SQL that lists the 5 best wages by Dept. This was not done using traditional reports because management wanted a "dashboard" as the look and feel that is already existing and what is happening in that it is a pl/sql block that has the sliders and the necessary HTML, CSS in there.
Below that is an IR when the user clicks on the dept of region of PL/SQL, it will refresh the IR below to display all employees in this Department
Top of the page shows region of PL/SQL
EMP name Dept wage
Emp1 10 10000
EMP2 10 950
Emp3 20 800
The Dept field is a hyperlink.
When we click on Dept on this region of PL/SQL
The lower IR should be updated (without submit page)
Output
Emp1 10 10000
EMP2 10 950
It is a kind of master-detail relationship between PL/SQL and Report (Detail) (Master) area Interactive
We can hyperlink in the SQL in pl/sql area, but you wonder how trap line and pass the dept id to the IR and get this region to refresh account?
All suggestions from the experts?
Thank you
Ryan
It is a way to pass the info in connection
Perform the dynamic Action of the link column report
The dynamic action can submit the session state value, and then refresh the IR.
On either by the way, you must create dynamic PL/SQL region to solve this problem, see this
APEX reports: layout custom with a column named (model line)
-
Import/Export of master detail Page lose columns on the MRU
When I export and then import my request, master details page loses column on retail MRU on Version 4.2.3.00.08
I tried to import and export in the same environment and our development environment to production environment with all the application and just the page and it still loses the columns.
It's the work insert debug statement
...... Rank 1: insert into "SHARED_INFRASTRUCTURE". "" CODE_GROUP_VERSION values ' ('CODE_GROUP_VERSION_ID', 'CODE_GROUP_ID', 'VERSION_NO', 'VALUE_SET_OID', 'DEFINING_ORGNZTN_VERSION_ID', 'REFERENCE_TXT', 'REFERENCE_DSC', 'EFFECTIVE_START_DT', 'EFFECTIVE_END_DT', 'STATUS_CD', 'CREATED_DTS', "CREATED_BY_USER_ID") (: b1,: b2,: b3: b4,: b5,: b6,: b7,: b8,: b9,: b10,: b11,: b12)
This is the debug statement insert to import and export which does not work properly.
...... Rank 1: insert into "SHARED_INFRASTRUCTURE". "" The values CODE_GROUP_VERSION "("CODE_GROUP_VERSION_ID","CODE_GROUP_ID") (: b1,: b2)
This is resolved. There are two editable under conditional display reports and he used the second update report. Changed to a single display report and he picked up the first editable report.
-
The master/detail Page scroll, Incorrect rendering position
I think that it is something simple that I am on and I hope that someone will be able to indicate what it is.
I have a Setup master/detail, how they were created in the packed app go live Checklist for projects (see page 200) mirroring.
- This means that my page template is a type of master/detail with a classic/region report selector in the master detail region. The classic report is set to not show in the region selector.
Under it, I have several regions, each game to be included in the region selector.
UPDATE: My first region on the page has several components display only in it. If I do not show this region then the problem of scrolling stops.
My problem is when I insert in the page that the page is automatically past the master section, scroll up to the region selector. However I can scroll to top knowledge my master.
Anyone have an idea what might cause this behavior?
Hamster wheel engineer wrote:
I think that it is something simple that I am on and I hope that someone will be able to indicate what it is.
I have a Setup master/detail, how they were created in the packed app go live Checklist for projects (see page 200) mirroring.
- This means that my page template is a type of master/detail with a classic/region report selector in the master detail region. The classic report is set to not show in the region selector.
Under it, I have several regions, each game to be included in the region selector.
UPDATE: My first region on the page has several components display only in it. If I do not show this region then the problem of scrolling stops.
My problem is when I insert in the page that the page is automatically past the master section, scroll up to the region selector. However I can scroll to top knowledge my master.
Anyone have an idea what might cause this behavior?
The Cursor Focus of page property is set to the first item on the page? If so, change it to don't focus cursor.
-
master/detail relationship through two workflow
Hello world
I use jdev 11.1.1.7.0.
In my application, I created a relationship master-detail between departments and employees (departments is master and employees is detail). Then, I created two stubborn workflow.
Department-stream with a department.jsff and I drag / drop the departmentVO as a form.
employee-stream with an employee.jsff, on this page I drag / drop employeeVO located under departmentVO in the control panel of data:
can I use these two TFs (Department-flow and employee-flow) through two different ways
1- I create a main.jspx page and I put two TFs as an area on main.jspx.
<af:form id="f1"> <af:region value="#{bindings.departmentflow1.regionModel}" id="r1"/> <af:region value="#{bindings.employeeflow1.regionModel}" id="r2" partialTriggers="::r1"/> </af:form>
in this case when I run the homepage, two TFs are in sync with each other, I mean when I navigate between departments in the workflow Department, employees in the employee flows are discount
and also if I enlist in the workflow Department then changes in the flow of employee will be validated.
2- in this case first I create a master stream with an master.jsff and then I put two TFs as an area on master.jsff.
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"> <af:region value="#{bindings.departmentflow1.regionModel}" id="r1"/> <af:region value="#{bindings.employeeflow1.regionModel}" id="r2" partialTriggers="::r1"/> </jsp:root>
and finally I put flow master as a region on the page main.jspx.
<af:form id="f1"> <af:region value="#{bindings.masterflow1.regionModel}" id="r1"/> </af:form>
in this case, when I run the main.jspx , always the two page two TFs are in sync with each other (updating of employees when I navigate between departments)
but in this case the validation in the workflow Department commit not changes in the flow of employee.
Anyone know how I can I have this (validation cause Department-stream flow used as case 1)?
Habib
Concerning
Habib,
I just did what you said.
1. Ran the mainWithMasterFlow.jspx,
2. the Department rendered initially has only one employee.
3. has changed the salary. (Kept the emphasis placed in the same field)
4 click "Commit".
Above scenario failed, because the change in value has not been submitted. Try adding autoSubmit = true for the salary field and then repeat the procedure, you will see the file be saved.
Rambeau
-
Unique constraint in the form of master detail error
Hi all
I need help, the following requirement.
I have a master detail form developed on master-child table. the tables have the composite key.
Old masters has a composite key on columns (A, B)
Children table has a composite key on columns (A, B, C)
Child block look something like below
C A B
10 AAA 1000
20 1300 BBB
30 CCC 1400
40 DDD 1200
Increments of column C with 10 for each record, and if a new record is insert in intermediaries the records it is incremented to 5.
My requirement is when an end user attempts to insert record between 20 and 30 or 30 and 40 and clicks on save, the value of the C column must regenerate as shown below
C A B
10 AAA 1000
20 1300 BBB
XXX 30 900
40 CCC 1400
50 DDD 1200
Button Save I wrote the following code
Declare ln_Count NUMBER :=0; ln_c number :=0 cursor c1 is select c from child where a=:child.a and b=:child.b Begin Go_Block('Child'); First_Record; LOOP ln_Count:= ln_Count+10; :child.C := ln_Count; EXIT When :System.Last_Record = 'TRUE'; Next_Record; END LOOP; For c_cur in c1 Loop update child set c:=ln_c+10 where a=:child.a and b=:child.b and c=c_cur.c end loop; Forms_DDL('commit'); commit_prc('Commit'); -- We have our own program unit to call commit_form END;
I tried above in a way because, before approving the changes to the table, I update the existing values in the table of the C column so I would not get unique constraint error.
When you click the button Save, I get a constraint exception. Hope I made my requirement clear.
Can someone give me a clue to this implementation.
Thank you
malandain
With this update, all your C-columnvalue became negative. When you post the form thereafter, forms update agaion records one by one the new positive figures. Because the numbers of 'old' in the db are now negative, there will be no violation-UK.
-
Problem of master / detail
Hello
I have 3 blocks in my form
control unit 1 for the search criteria.
2. master / detail blocks (2), where ownership of the main block clause is "' item_id =: search.item_id", the block of research concerns the search criteria (control block), "
-: search.item_id is what I am looking for with its value.
I open the form, I write 2 the: search.item_id, the data is retrieved in the main blocks and details, but what happens is that when I change the "2" "3"
the data contained in the block of retail have disappeared, and the data in the master is still such what without change, I don't know why.
I am sure that he has given belong to the number '3 '.
-the search button has this code:
go_block ('stock'); -stock is the main block.
execute_query;
Thanks for the reply,
1. I found the problem,
There is a function in the form
function qty return number is begin select something , something2 , something3 into :item1 , :item2 , :item3 from dual ; return 6 ; end ;
and there was an article that I created to entrust this function as a formula, but I think that the function that create must return a variable not a number.
and this variable should be in the clause 'in', he has solved when I changed it.
2-i, created a control block, because the user can change the item_id and save the form, does not search form, then it will update the data. right?
Maybe you are looking for
-
How can I hide/show toolbar again operate independently on multiple instances of firefox?
I run two instances of firefox.exe. One for the left monitor and one for the right. There is a toolbar that I want to see on the right screen, but I don't want to see it on the left screen. This used never to be a problem, but it is now. It seems as
-
Preparation tool update system for Vista
Vista Home premium 32-bit with Vista SP3 Norton Internet Security 2010 back in June 2010, I received an update to run the preparation tool update for Vista system. I ran that tool, but may not have let finish because it took almost an hour with no en
-
take the amount of free space between other volumes
Hi all, my C drive has 1% left, while my E drive has 29,42 GB and my Fdrive GB 58.69. I need to renew my Norton 360 in a few days, so it's urgent. Can I easily increase my primary volume to steal say 30 GB of my disk f. - F disk is used, is only 1%
-
I lose the internet connection Window vista Home premium intel core 2 quad CPU q6600 @ 2.40 ghz, 3.00 GB ram the System 32-bit The internet connection is lost when the computer puts itself to sleep after that idlen too long time needs to restart to r
-
When I put in a disc it does not load. you hear it turn but nothing. It pops out I'm not sure if the disk or something is messed up. also how do my administration removed on my account a lot of things that I can't reason because it usually leaves me