Specifying an instance of a repeatable row
I am trying to bind the data between two fields that are both repeatable. Basically, I have a table with a repeatable row, and in this row the user will enter a part name and a part number and various other information. They will also specify wither the part is "New" or "Change." For each part that is marked as "Change," I add an instance to a repeatable table on another page of the form (this table is only present for parts marked as "Change," so if I have five rows in the first table and only three parts are marked as "Change," then I should have three instances of the table on page two). This is all well and good, but the tables on the second page should have a field for part name and part number that matches what is in the corresponding row on page 1. Initially, I wrote a for loop that set the value of the fields in the first instance of the table on page two to the value of the fields in the first instance of the row on page one. However, this won't work because it does not take into account whether the row is marked as "Change" or "New." Is there a way to evaluate or identify something as the first instance where a value is true or false? e.g. - make a field equal to the first instance of a row where a condition is true\
the code I am currently using is:
for (i = 0; i < DispositionTable_1._Row1.count; i++) {
if (this.parent.index === i) {
this.resolveNode("form1.ECO_Table_subform.ECO_table[" + i.toString() + "].Change_1.Change_1_header.PN1").rawValue = this.resolveNode("$").rawValue;
and I also tried this (but it didn't work):
for (i = 0; i < DispositionTable_1._Row1.count; i++) {
if ((this.parent.index === i) && (this.resolveNode("form1.Disposition_table_subform.DispositionTable_1.Row1[" + i.toString() + "].change_checkbox").rawValue == "1") {
this.resolveNode("form1.ECO_Table_subform.ECO_table[" + i.toString() + "].Change_1.Change_1_header.PN1").rawValue = this.resolveNode("$").rawValue;
Hi,
I am not sure where the code you have shown is being used, but you could try using the calculate event of the second table, this would give you some code like;
_Row1.setInstances(0);
var rowCount = Table1._Row1.count;
var rows = Table1.resolveNodes("Row1[*]");
for (var i = 0; i < rowCount; i++)
var row = rows.item(i);
if (row.NewChange.rawValue === "Change")
var secondTableRow = _Row1.addInstance(true);
secondTableRow.PN1.rawValue = row.PN1.rawValue;
Here is a link to an example, I hope it helps https://sites.google.com/site/livecycledesignercookbooks/home/a.c.hoff.pdf?attredirects=0& d=1
Regards
Bruce
Similar Messages
-
Triggering "exit" event of a drop-down list in all instances of a table row
I have a drop-down list in a table row with multiple instances that performs a calculation on the exit event. This calculation draws information from 2 other dropdown lists contained above in non-repeating rows of the same table.
The desired behavior is: should the user change their choices above, all instances of the drop-down list below would perform the "Exit" event script accessing the new values above.
My script is:
RowOptionalCoverage.DdlCoverageType.execEvent("exit"); this works, sort of
It only updates the first instance of RowOptionalCoverage and none of the subsequent instances. The user can "Tab" through the instances and trigger the Exit event for each instance, but this is not a reasonable solution.
I have tried using the resolveNodes method without success. I understand, using the resolveNodes method may be necessary when referencing multiple instances of an object:
this.resolveNodes("RowOptionalCoverage[*].DdlCoverageType[*]").execEvent("exit"); doesn't work
xfa.resolveNodes("RowOptionalCoverage[*].DdlCoverageType[*]").execEvent("exit"); doesn't work
No doubt, I must be using the resolveNodes incorrectly or missing something? Probably something simple.
Any advice is greatly appreciated.
StephenPERFECT!!! Works right out of the box!
This has opened my eyes to the essential nature of loops. My form is very large and complex and functions correctly, Yet the coding is lacking in sophistication--no loops, functions, fragments or other code efficiencies. I am teaching myself (with the help here) and I have skipped learning and using some techniques when I could things to work using the limited skill set I have.
Sometimes, I just don't "get it". After I fail a few times, I skip it and try something else. Functions are a great example. I could utilize a bunch of these if I could only write one that works. It is frustrating. If I got one to work, I know could write a ton of them. But, there is some essential part of functions I am missing that's preventing me from having my first success with them. (I think it has to do with not understanding arguments completely).
Anyway, I am overjoyed with the solution you provided and I understand it well enough to be able to use again in other situations.
Thanks again!
Stephen -
Pick only one row from the repeated rows
Oracle 10g r2 (10.2.0.5)
I have a query/view, which returns the the reords as follows
set colsep ||
Name || Address || Zip
abc123 || Ln1 || 123456
bcd123 || Ln2 || NULL
bcd123 || Null || 45678
efg123 || Ln0 || 96345
efg123 || Ln0123 || Null
efg123 || adr || null
the result set I need from the above is
set colsep ||
Name || Address || Zip
abc123 || Ln1 || 123456
bcd123 || Ln2 || NULL
efg123 || Ln0 || 96345
As you see that the first record on each repeated row sets are required
Thanks,Hi,
Using the aggregate FIRST (or LAST) function like that, there's no guarantee that all of the output values on the same row will come from the same row in the original table. To do that, you can use the analytic ROW_NUMBER function, like this:
WITH got_r_num AS
SELECT name, address, zip, ...
, ROW_NUMBER () OVER ( PARTITION BY name
ORDER BY address
, zip
) AS r_num
FROM table_x
SELECT name, address, zip, ...
FROM got_r_num
WHERE r_num = 1
;This assumes the "first" row is the one with the first address (in alphabetic order), and, in the event of a tie, the one with the lowest zip (however "lowest" is defined for zip). You can specify any order you want in the analytic ORDER BY clause.
I hope that answers your question.
If not, what is your question? Use words other than those you've already used to describe what you want to do.
Explain exactly what "first" means in this problem.Point out where the query above (or the one posted by Claytonian, if that seems closer) is getting the wrong results, and explain how you'd get the right results in those places.
If necessary, post new sample data (either CREATE TABLE and INSERT statements, or a WITH clause, as Claytonian did) and the results you want from that data. -
Repeated rows resulting from executeWithParams on query with bind variable
hi
Please consider this example application created using JDeveloper 11.1.1.3.0
at http://www.consideringred.com/files/oracle/2010/RepeatedRowsIssueApp-v0.01.zip
It has a View Object "EmployeesVO" based on a SQL query with a bind variable "EmailBVar".
The page "findEmployees.jspx" has executeWithParams dropped as an "ADF Parameter Form..." and the "EmployeesVOVI" collection as a table.
On "EmployeesVOVIIterator" the RangeSize has been modified from the default 25 to 10.
So, all straightforward stuff.
A scenario (sc1), running the page "findEmployees.jspx", specifying a value and clicking the "ExecuteWithParams" button results in repeated rows shown in the table, that is the first row (and subsequent rows) are repeated at row 11 (and subsequent rows),
as can be seen in the screencast at http://screencast.com/t/bn9QvV0qt
question:
- (q1) How can the repeated rows in scenario (sc1) be explained/avoided?
many thanks
Jan VerveckenThanks for your reply Nick Haralabidis.
it can be avoided by setting the EmployeesVO Access Mode to Range Paging and setting the Range Size to 10. Indeed, that does seem to avoid the repeating rows.
Now why you get this behavior when you don't specify Range Paging on the VO I don't know. It could be because: 1) it is a bug - the obvious answer ;) , 2) because setting the RangeSize on the EmployeesVOVIIterator without setting the Access Mode on the EmployeesVO to Range Paging is conflicting - but then again there is no warning or error produced by JDeveloper, 3) ...It does look like unintended behaviour, for a "default approach" like this.
In documentation section "39.1.5 Efficiently Scrolling Through Large Result Sets Using Range Paging " ...
at http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadvvo.htm#ADFFD1179
... this Range Paging for a View Object seems to be described as an optimization, not as a requirement for functionally correct behaviour.
- about (q1)
Another approach that seems to avoid the repeated rows in scenario (sc1) is removing the value for the RangeSize attribute on the iterator, so the RangeSize is not specified.
Using the modified example application
at http://www.consideringred.com/files/oracle/2010/RepeatedRowsIssueApp-v0.02.zip
... this can be seen in scenario (sc2) in the screencast at http://screencast.com/t/0bpCo33i8J
Although, the documentation in section "22.4.2.2 Iterator RangeSize Attribute " ...
at http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/web_form.htm#ADFFD706
... does not seem to mention anything about not specifying the RangeSize attribute, it does say "... You can set it to -1 to have the full record set returned. ...".
As can be seen in scenario (sc2) the EL expression #{bindings.EmployeesVOVIIterator.rangeSize} resolves to -1 which suggests that not specifying the RangeSize attribute is the same as configuring the RangeSize attribute to -1.
questions:
- (q2) What is the preferred way to avoid having "the full record set returned", without having repeated rows as in scenario (sc1)?
- (q3) Is the default configuration of RangeSize="25" on the iterator intended behaviour (for an interator supporting an executeWithParams action)?
regards
Jan -
Repeatable row disabled by default. Need to enable all rows based on value in XML.
I have a repeatable row in a table that is defaulted to read only. If a certain value doesn't exist in the XML (populated != x), I want to make add / remove buttons visible and and make the text fields in the row and all subsequent instances Open.
when populated !=x:
This is the code:
if (xfa.host.name != "XFAPresentationAgent" && this.resolveNode("populated").rawValue != "x") {
oTargetField = this.resolveNode("#subform[2].tbl_people.person.name");
oTargetField.access = "open";
oTargetField = this.resolveNode("#subform[2].tbl_people.person.relationship");
oTargetField.access = "open";
oTargetField = this.resolveNode("#subform[2].tbl_people.person.age");
oTargetField.access = "open";
When I use this, it only enables the first row and none of the subsequent rows/instances.
Any assistance would be greatly appreciated!
-JeffHi DCS_JeffW,
I guess, you need to follow these steps:
1) You need to find the number of repeating rows first. Assuming that "people.person" is the repeating instance:
var countOfPPInstances = xfa.resolveNode("....people.person").instanceManager.count;
2) Modify your code as follws:
if (xfa.host.name != "XFAPresentationAgent" && this.resolveNode("populated").rawValue != "x")
for(var i=0;i<countOfPPInstances;i++)
xfa.resolveNode(“..people.person[“+i+”].name").access=”open”;
xfa.resolveNode(“..people.person[“+i+”].relationship").access=”open”;
xfa.resolveNode(“..people.person[“+i+”].age").access=”open”;
Let me know if this works. Alternatively, you can mail me your form @ [email protected] -
Deleting a single instance of a repeating event deletes the series
Has anyone noticed that deleting a single instance of a repeating event (e.g. deleting tomorrow's occurrence of a regular, weekly meeting) deletes the entire series? This is when using the calendar via the iCloud.com website. I've had this happen at least 3 times.
Configuration:
Ubuntu Linux 10.10
Google Chrome 12.0.742.91
AndrewThis happens without iCloud when you sync your calendar to MS Outlook/Exchange - it always deletes the whole series and makes it so I can never delete items from iPhone or iPad. IOS calendar is pretty lousy - won't let you edit things like the reminder time or location of the meeting, etc. when it comes through sync with Outlook/Exchange.
Wish Apple would actually make their calendar app useful or let a third party release a better one. Same goes for managing Tasks. E-mail is pretty good, but Calendar and Task management is lousy. And we don't even get to rate these apps like we do 3rd party apps. -
Hierarchy: How to suppress duplicated/repeated rows in a BEx query
Hi Gurus.
I have a BEx query which displays data based on a Cost Element hierarchy. When the hierarchy is expanded to leaf level (or any level), all key figures and characteristics are displayed for the leaf level but are also repeated throughout all the levels above.
Is it possible to suppress the repeated rows in higher levels of the hierarchy and display a summary result only?
The issue we have is that if the user wishes to export or save a workbook, they will have to filter and manipulate the report a great deal which is impractical.
I'm hoping it's a simple setting that I've missed. I look forward to receiving the magic answer!! :o)
Thanks,
AngelaHi All,
I've been playing around a bit more and found a setting which I hope my users will find acceptable:
From the query - Query properties -> Data Formatting tab - Multidimensional View -> select Display Rows hierarchically and expand to (chosen characteristic)
Can anyone tell me if I can set this as a default setting in the query designer, or will I need to create a view to save the setting?
Thanks all,
Angela -
How to repeat row header in all pages in Financial Reporting?
Hi,
I have created a simple Financial Report with landscape mode, I could not able to view the row header in second page. Please help me out , how to repeat row header in all pages?
Edited by: Awesome on Dec 13, 2012 2:04 PMHi,
Refer following link which states how to change the Page Setup setting (just an addition to above poster's explanation):-
http://docs.oracle.com/cd/E12825_01/epm.111/fr_user/frameset.htm?1900.html
Regards,
Edited by: 918547 on Dec 14, 2012 6:17 PM -
How to specify OAS instance in deployment descriptor
Hi
I've got OAS 10.1.3.1.0, where exist home, home1, home2... instances. In JDev I've developed web app. and deployment descriptor for it. How to specify correct instance in depl. descriptor?
Thank youSorry, it's still not clear. You have a deployment profile. Now:
Are you right-clicking that profile and saying "deploy to <app server>?" If so, you define the instance when you created the app server connection.
Otherwise, if you're using some other way of deploying (e.g., AS control), you explicitly navigate to the instance and deploy the app from there.
John -
Totals Based on Multiple Criteria in Repeating Rows
Hi All,
I have 3 dropdowns (DD1, DD2, DD3) and one textfield (TF1) in repeating rows (not in a table). Each dropdown has two choices and the textfield is free-form. Outside of the rows (in a different subform) I want totals based on multiple criteria from the dropdowns and textfields.
The following script works great to get a total number of one choice from one dropdown.
this.rawValue = xfa.resolveNodes('form1.Form.row[*].DD1.[$.rawValue == "2"]').length;
Problem is how do I calculate the totals for the following based on the criteria listed in each row.
Find the totals for ML
Number of New Forms 1-2 Pages: (result should be 2)
Number of New Forms 3+ Pages: (result should be 1)
Number of Revised Form: (result should be 0)
In row #1: select “New” as a choice from DD1, “Form” as choice from DD2, “ML” as a choice from DD3 and enter “5” in TF1.
In row #2: select “New” as a choice from DD1, “Form” as choice from DD2 , “ML” as a choice from DD3 and enter “1” in TF1.
In row #3: select “New” as a choice from DD1, “Form” as choice from DD2, “ML” as a choice from DD3 and enter “2” in TF1.
In row #4: select “Revised” as a choice from DD1, “Series” as choice from DD2, “ML” as a choice from DD3 and enter “1” in TF1.
In row #5: select “New” as a choice from DD1, “Form” as choice from DD2, “PM” as a choice from DD3 and enter “1” in TF1.Try something like;
var mlNewForms1or2Pages = 0;
var mlNewFormsOver3Pages = 0;
var mlRevisedForms = 0;
var rows = xfa.resolveNodes('form1.Form.row[*]');
for (var i = 0, limit = rows.length; i < limit; i++)
var currentRow = rows.item(i);
if (currentRow.DD1.rawValue == "1") // new
if (currentRow.DD2.rawValue == "1") // form
if (currentRow.DD3.rawValue == "1") // ML
if (parseInt(currentRow.TF1.rawValue, 10) > 2)
mlNewFormsOver3Pages++;
else
mlNewForms1or2Pages++;
else // revised
if (currentRow.DD2.rawValue == "1") // form
if (currentRow.DD3.rawValue == "1") // ML
mlRevisedForms++
console.println(mlNewForms1or2Pages);
console.println(mlNewFormsOver3Pages);
console.println(mlRevisedForms);
To do the same using predicates you could do;
var mlNewForms1or2Pages = 0;
var mlNewFormsOver3Pages = 0;
var mlRevisedForms = 0;
mlNewForms1or2Pages = xfa.resolveNodes('form1.Form.row.[DD1 == 1 and DD2 == 1 and DD3 == 1 and TF1 <= 2]').length;
mlNewFormsOver3Pages = xfa.resolveNodes('form1.Form.row.[DD1 == 1 and DD2 == 1 and DD3 == 1 and TF1 > 2]').length;
mlRevisedForms = xfa.resolveNodes('form1.Form.row.[DD1 == 2 and DD2 == 1 and DD3 == 1]').length;
But if you wanted totals for all the permutations then this could become slow.
Regards
Bruce -
Hi I joined two table and created the new table called FMW_ANALY. Which has some repeating rows. I used the following Query to list the top 10 customers by value
SELECT *
FROM
(SELECT CUSTOMER, OPP_VALUE, RANK() OVER (order by OPP_VALUE DESC) opp_val_rank
FROM FMW_ANALY)
WHERE opp_val_rank<=10;
I'm getting the following result
Customer Opp Value Opp Val Rank
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Department of Education and Training 8991776.99 1
Investments Commission 7447419.84 22
Bank Limited 4803000 23
Bank Limited 4803000 23
Bank Limited 4803000 23
Bank Limited 4803000 23
Bank Limited 4803000 23
Bank Limited 4803000 23
Bank Limited 4803000 23
Bank Limited 4803000 23
How can I Query without these repeating rows?
Thank you
VickExample which will help you understand Rank, Dense Rank
SQL> ed
Wrote file afiedt.buf
1 select deptno, ename,sal,
2 rank()
3 over (order by sal desc)rnk,
4 dense_rank()
5 over (order by sal desc)densernk
6 from emp2
7* order by sal desc
SQL> /
DEPTNO ENAME SAL RNK DENSERNK
10 KING2 5000 1 1
10 KING 5000 1 1
20 SCOTT2 3630 3 2
20 SCOTT 3630 3 2
20 JONES2 3272 5 3
20 JONES 3272 5 3
20 FORD2 3000 7 4
20 FORD 3000 7 4
30 BLAKE2 2850 9 5
30 BLAKE 2850 9 5
10 CLARK2 2450 11 6
10 CLARK 2450 11 6
30 ALLEN2 1600 13 7
30 ALLEN 1600 13 7
30 TURNER2 1500 15 8
30 TURNER 1500 15 8
10 MILLER2 1300 17 9
10 MILLER 1300 17 9
30 WARD2 1250 19 10
30 WARD 1250 19 10
30 MARTIN2 1250 19 10
30 MARTIN 1250 19 10
20 ADAMS2 1100 23 11
20 ADAMS 1100 23 11
30 JAMES2 950 25 12
30 JAMES 950 25 12
20 SMITH2 800 27 13
20 SMITH 800 27 13
28 rows selected.
SQL> ed
Wrote file afiedt.buf
1 SELECT * FROM
2 (
3 select deptno, ename,sal,
4 rank()
5 over (order by sal desc)rnk,
6 dense_rank()
7 over (order by sal desc)densernk
8 from emp2
9 order by sal desc
10 )
11* WHERE DENSERNK <=5
SQL> /
DEPTNO ENAME SAL RNK DENSERNK
10 KING2 5000 1 1
10 KING 5000 1 1
20 SCOTT2 3630 3 2
20 SCOTT 3630 3 2
20 JONES2 3272 5 3
20 JONES 3272 5 3
20 FORD2 3000 7 4
20 FORD 3000 7 4
30 BLAKE2 2850 9 5
30 BLAKE 2850 9 5
10 rows selected. -
How to create repeating rows field type in visual studio for sharepoint
HI
I would like to check if there is any work around for the repeating rows field
type other than buying 3rd party tool or using info path, Because i have SharePoint foundation server.
ThanksHello,
You can use repeater control in custom webpart where you can add multiple details similar to repeating table:
http://www.c-sharpcorner.com/Blogs/10913/add-dynamic-row-using-repeater.aspx
Correct me if i misunderstood you
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
How to remove all instance in a repeatable subform (bis)
Hi Niall,
A few years ago, you helped a user who asked "How to remove all instance in a repeatable subform". Please could you do again with approximately the same problem ?
In a click event, I have the script "_CarteEN.addInstance();". Well ! Many cards appear. To protect them, I put above a mask (it's a button with a background Fill). Now, how can I do to remove all masks with only one click using the resetdata or anything else...
I try this but it doesn't work.
while (flowedSubform.CarteEN._CacheCV.count > 2)
flowedSubform.CarteEN._CacheCV.removeInstance(1);
Many thanks for your help !There is no subform named "flowedSubform"
The "CacheCV" is not a container object (subform). so you can't access the instanceManger of this object.
the below lines should work
while(_CarteEN.count >1)
_CarteEN.removeInstance(1);
Nith -
How to repeat rows in numbers on every page
how to repeat rows in numbers on every page
Hi mitesh hirani,
Welcome to Apple Support Communities.
Do you mean repeat Header Rows for tables?
Menu > Print... > Print Setup (the panel on the right) > Repeat Table Headers
Regards,
Ian. -
I have a table of repeating rows which shows fine. I want to
add a delete button to each row and can get this to work fine but
once the button is added, when viewed, the table has extra space
under each button. It is like there has been a <br> tag
added. This means that the table is now twice as big and not lining
up correctly.
Is it possible to keep the row a standard height. I have
tried adding css to the button, extending the cell width, and
adding no wrap but all to no avail.> I want to add a delete
> button to each row
is this delete button a form element?
use css to restyle the default margins of the <form>
tag to 0
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/
Maybe you are looking for
-
IPhone 5 won't update to iOS 8
Hey there I seem to be having this software update with my iPhone 5 software. Previously when iOS 7 had come out... I had tried to update my phones software by using iTunes and it would go 3/4 way through and a message would come up saying that the s
-
How to Link AD user with Apps user
Hi, We are in process of authenticating EBusiness suite users against their Active Directory credentials. We did the following: 1. Import Apps users into OID 2. Import AD users into OID We dont know how to link AD account with EBz account. Are we on
-
As of today photoshop 11 will not recognize my scanner.
As of today, Photoshop 11 will not recognize my scanner. It was working fine before. My scanner is connected via wifi. Yesterday I lost the wifi connection so i reinstalled the scanner (cannon printer MG6120). Now it prints photos ok but I can no
-
Urgent: Duplicate Message and Duplicate idoc ..
Hi All, need help. I have file(Asynchronous ) to Idoc scenario. We are processing file and creating idoc. in file adpater : we have confguration 1) Exactly once. 2) File content conversion/ 3) Processing mode : Archive 4) Add time stamp It wa
-
Windows 8 final on Windpad 110W
I'd like to report a 90% successful install of Windows 8 x64 Professional on the Windpad 110W. What I can't get working is revealed at the bottom. Lessons learned: The built in SSD card is very bad - it's actually slower than a mechanical hard drive,