Subforms within subforms add Instance problem
Hi
I am new to Adobe Livecycle Designer (I am using version 8.2.1) but I have successful made nearly all elements of the quite long form I need to produce except for one section I am having difficulty getting it to function correctly. In the example I have a repeating subform ‘Organisation’ on page subform ‘Membership’ which has buttons to add and remove instances, which work correctly. But within each instance of this ‘Organisation’ subform is another repeating instance subform ‘ExpertNames’ with buttons to add and remove instances.
The ‘Organisation’ form allows an organisation to be named and the ‘ExpertNames’ subform allows multiple members for that organisation to be named and associated to each organisation. The user should be able to list multiple organisations each with one or more members. I can successfully add multiple instances of ‘Organisation’ form one after another using
Membership.Organisation.instanceManager.addInstance(1)
and remove the selected instance using
Membership.Organisation.instanceManager.removeInstance(this.parent.index)
I have the following set on the button to add a new instance of the ‘ExpertNames’ form
Membership.Organisation.ExpertNames.instanceManager.addInstance(1);
and the following to remove the selected instance of the 'ExpertNames' form
Membership.Organisation.ExpertNames.instanceManager.removeInstance(this.parent.index);
However when I add a second instance of the ‘Organisation’ form i.e. a new organisation and try and add additional members to the 2nd organisation it adds them to the 1st organisation rather than the second! I have an example of the problem form i can send if needed.
Hope someone will be able to help with this.
Many thanks in advance
Lara
I still have not been able to find a solution to this does anyone have any ideas?
I have an example of the problem in a form that I can email.
Many thanks in advance
Lara
Similar Messages
-
G'day
I'm very new to LiveCycle and teaching myself to create forms
I have a drop down box in a subform requesting information. Depending on the information required certain text boxes will appear (using switch case script) dateFrom dateTo dateCourt txtOther
When I add a new instance of this subform the list appears correctly in the drop down box but when the item is selected the text boxes do not appear at all.
I am probably missing something fundamental. Any ideas
Cheers
//cboInfoRequired
RFI.InfoRequested.Info.cboInfoRequired::exit - (JavaScript, client)
switch(RFI.InfoRequested.Info.cboInfoRequired.rawValue){
case "Info A":
RFI.InfoRequested.Info.dateFrom.presence = "visible";
RFI.InfoRequested.Info.dateTo.presence = "visible";
RFI.InfoRequested.Info.dateCourt.presence = "hidden";
RFI.InfoRequested.Info.txtOther.presence = "hidden";
break;
case "Info B":
RFI.InfoRequested.Info.dateFrom.presence = "hidden";
RFI.InfoRequested.Info.dateTo.presence = "hidden";
RFI.InfoRequested.Info.dateCourt.presence = "visible";
RFI.InfoRequested.Info.txtOther.presence = "hidden";
break;
case "Info C":
RFI.InfoRequested.Info.dateFrom.presence = "hidden";
RFI.InfoRequested.Info.dateTo.presence = "hidden";
RFI.InfoRequested.Info.dateCourt.presence = "hidden";
RFI.InfoRequested.Info.txtOther.presence = "visible";
break;
case "Info D":
RFI.InfoRequested.Info.dateFrom.presence = "hidden";
RFI.InfoRequested.Info.dateTo.presence = "hidden";
RFI.InfoRequested.Info.dateCourt.presence = "hidden";
RFI.InfoRequested.Info.txtOther.presence = "hidden";
break;
//cmdAdd
RFI.InfoRequested.AddInfo.cmdAdd::click - (JavaScript, client)
RFI.InfoRequested.Info.instanceManager.addInstance(1);Hi,
the problem is your SOM expression.
When you write RFI.InfoRequested.Info.dateFrom.presence = "hidden"; the PDF-viewer interprets it always as RFI[0].InfoRequested[0].Info[0].dateFrom[0].presence = "hidden"; where the accessor [n] is always 0 which means the first instance of the related object.
It should work if you just write dateFrom.presence = "hidden"; because the object is at the same level in the hierarchy and there is no need to parse the entire tree to find the object. -
Ciscoworks 4.0, netconfig job, add instance problem
I'm trying to make an adhoc job to some devices in ciscoworks. I select netconfig jobs, select the devices I want to do a change to, and then select add instance, I get a new browser window saying loading and nothing more happens.
I cannot create the config lines I want to perform to my switches. I just want to change the vtp domain name to the switches, but cannot do this due to the blank browser window saying loading.
Anyone know anything about this?
Br
GeirI just updated my LMS 4.0 device packages, and I cannot reproduce. I then noticed your SharedNetconfigIOS.zip package is larger than mine. I suspect it's corrupt. Go to Admin > System > Software Center > Device Update, check the boxes next to Common Services and Inventory Config And Image Management and download and install all available packages. If none are available, you will need to contact TAC to get an up-to-date package repository to correct this problem. You can click the "Open Service Request" link in the Actions panel of this thread to capture everything we've done here if you have to open a service request.
-
Add Instance Subform content to textbox
Hi all,
There is sth I would like to do.
I have a form which has a text field that is in a subform where you can add instances. No problem with pages etc.
Now, I have created a text field where I would like all entries to be repeated as plain text possibly separated by rows.
For example:
Textbox in Subform: Eggs
Textbox 2 in Subform (after clicking the add instance button): Butter
Text box at the end should either say:
Eggs, Butter
or
Eggs
Butter
Does anyone have an idea on how I can achieve this?
Thanks a lot,
LarissaHi Paul,
Actually I have several requirements. I have attached the pdf as this seems easier at this point.
At the beginning of the pdf, I have the marks in three boxes. I would like to concatenate them with a comma between the different entries into a text field that users can then copy paste into the next form.
Let’s say in the first box you put:
A
B
C
In the second,
D
E
I would like to have a text box that comes out as: A,B,C,D,E
Second problem I am facing with this task is at the countries.
I have a country online selection and a second country selection.
Ideally I would like to have just one box with all countries and be able to tell the pdf that certain countries have the characteristic “Online”.
Thus if the client clicks on “Add” I would have two list boxes: One for Online and one for Rest. Depending on what the characteristic of the country it would either go into the Online or the Other.
Any ideas on my problematic.
I was thinking working with numbers and maybe telling the system that if it is under 100, move to Box 1, if it is over 100, move to Box 2.
Thanks for your help.
Kind regards,
Larissa -
Add instance in a subform which also can be doubled
Hi,
I have a subform X which can be doubled by a click on the button. In that subform X there is another subform Y which also can be multiplied to a maximum of 3.
Now when I add a subform X and i want to add some subforms Y. The form will only add the subform Y in the first subform X and not in the second one.
This is the script I use:
for subform x
if(Incitant52.subFoireAcheteur.all.length < 2){;
Incitant52.subFoireAcheteur.instanceManager.addInstance(true);
and for subform y
if(Incitant52.subFoireAcheteur.subAcheteur.all.length < 3){;
Incitant52.subFoireAcheteur.subAcheteur.instanceManager.addInstance(true);To add instances to the second occurance of subform x you will need to address it with subformx[1].
Note that the [ ] brackets are not valid in javascript so your expression should look something like this:
xfa.resolveNode("Incitant52.subFoireAcheteur.subformx[1]").instanceManager.addInstance(1) -
Subform reference (instance/index)
I have two drop-down boxes in a subform. When item in first drop-down is selected, items in second drop-down are limited (see example below). My problem is when multiple instances of the subform exist, the first drop down will only apply to the first instance of the form. Is there a way to be more specific in a subform row/instance reference? I want to change the item in the current row or current instance of subform.
Example:
1st Drop-down 2nd Drop-down
US New York or Washington (choose one)
France Paris or St. Martin (choose one)
ThanksThis image illustrates my problem. This table is actually a series of subforms. When a new instance is added, the user can choose a different region and then a state within the region. My problem is as rows/subforms are added I can't get the code to refer to the appropriate instance. It will only refer to the first instance and no new instances.
-
Calculation in an add instance
I am trying to use an if statement in an addinstance of an interactive form. Based on the results of one field in the addinstance, I want to sum a different field from the add instance. So, the customer can add any number of rows and choose from a drop down (coded 1-4) the position of the person. If that position is 1 or 2, I want to sum the salary field in a calculation box. If the position is 3, then I want to sum the salary(ies) in a second calcuation box, and if the position is 4, then I want to sum the salaries in a third calculation field. My code for one of the the calculation field looks like this:
form1.#subform[8].#subform[9].details.total.conditions.#subform[0].numTotal[
1]::calculate - (FormCalc, client)
if (detail[*].PTFT < 3) then
Sum(detail[*].salary)
endif
The other two fields are the same except that they change "<3" to "==3" or "==4".
The problem is that it does not sum the second or third calcuation field. Only my first calcuation field will work.
Since it is a rather simple if statement, I think that the problem may be in the subforms, possibly?
Please see my form at http://www.units.muohio.edu/lifelonglearning/forms/zzztest.pdf
Thanks in advance for any help you can lend.Ok I had a look at your form (nice form by the way ...good job). The expression you are using to determine the number of instances is not correct....as well when you sum the salaries it is the details subform that has th eiccurance numbers so that needs the * notation. Here is the 1st calc modified
if (details._detail.count < 3) then
Sum(detail[*
].salary)
endif
You also have the same code on the layout ready and the calc event. No need for both ...just leave it on the calc event and when the user enters the amounts the totals will update.
You are also getting an error when the row initialize .....a partNoScript is being called becuase of script behind the Name field (itis called txtPartNo in your form). My guess is that you copied this from the Purchase Order sample and forgot to remove the scritp from the Initialize and the change event. This field was originally a DD field and that is what was used to populate it.
Hope that helps
Paul -
Adding add instance into calculation
I am trying to get fields from add instance/subform fields to calculate with the rest of the form fields. The problem I am having is once I "add instance" the field is no longer part of the calculation. I have tried using:// Verify at least one instance of the midtr3a field exists.
if
(exists(location.yes900.admids.midtr3a) == 1) then
Sum(location.yes900.admids[
*].midtr3a)
endif
would appreciate any help on this.
Thanks KI think you do not have to check for whether the field exists or not..Because when you use the "Sum" function, it will check if the field is present and if it has value or not.
You may directly try the following int he script..
Sum(location.yes900.admids[*].midtr3a
Also in your Exists function, you are checking "exists(location.yes900.admids.midtr3a)".. This will only check for the first instance of the field.
Thanks
Srini -
Add instance on Read only field issue
I have a subform with two fields , one a date field to capture current system date and time and another is a Text field for some comments.
Then there are two buttons ,one for Adding the instance for these two fields and another is a Save button which makes these two fields
The requirement is that once both the fields are filled with data and i click on save button, the fields should become read only ,however when i click on the add instance button the instance is added successfully but the save button click is not making the new instance read only.
The Code for Add Instance Button is :
"New1.FileNote.instanceManager.addInstance(true);
xfa.form.recalculate(true);"
The code for Save button to make the fields read only is :
New1.FileNote.DateTimeField101.access = "readOnly";
New1.FileNote.TextField37.access = "readOnly";
Please guide me as I am totally blank on how to code the same..Have a rough logic of using a for loop with index of the Add Instance but not getting the way out for the code.
Thanks a lot for any help and guidance.Hi Steve,
Thanks for your reply..I made it happen using the for loop with Index and resolve node. However there is another issue which occured after that..I have a date/time field in that repeating subform instance.
The run time property is set to Current Date/Time. Now the issue is whenever i click on save, form.recalculate instance changes the existing time value in the previous subbform instance as well
Is there a way to retain the existing value in the field of the previous instance ??
Regards
Kapil -
I am working on a flash file AS2 that contains some combo
boxes.
When I start the program I can right click on a button and
add instance code ie current selection is the button.
After working on the file for a while I can't do this.
When I right click on new buttons and objects and select
actions the current selection shows as the frame not the
object I want to add code too.
This is very frustrating as I basically can't add instance
code.
Any help would be greatly appreciated
AlfredI think the problem was the pin current script button. Some
how I clicked this and no matter what I right clicked on it would
always take be to the last script I used before I hit the button.
Thanks for your prompt response.
Alfred -
1.
Can we add instance variables to an existing standard agent
e.g. can we edit the metadata file for an UNIX host (default agent installation which OEM provides) and add owr own variable ?
2.
How do we edit and add the values under "Target Properties" for each agent. Couldn't find a Save button...The following properties look empty and just wondering how do we add them ?
Comment
Line of Business
Deployment Type
Location
Contact
Thank youI dont understant what you say 'instance variables'
Provide me what are your problem or what do you need
Regards
PD: The target properties of a host or database can edit with grid control console or if you edit the targets.xml file
the agent properties also can edit if you modify the emd.properties -
Time subtraction within a Calendar instance
Hello all, quick question about time subtraction within a Calendar instance.
Calendar calendar = Calendar.getInstance();
System.out.println(calendar.getTime()); // Tue Apr 07 11:14:24 EDT 2009
calendar.set(Calendar.MINUTE, -10);
System.out.println(calendar.getTime()); // Tue Apr 07 10:50:24 EDT 2009Shouldn't the latter time be "Tue Apr 07 11:04:24 EDT 2009" instead?
Thanks,
wfRead the docs for set() more closely. It doesn't say it adds time. Also look for another method that might add time, since that is what you are doing.
-
How to use multiple profiles within the same instance of Thunderbird
About a month ago, I had Thunderbird configured with three profiles,
and all three could be used within a single startup/instance of
Thunderbird. That PC is now gone. I have re-configured the three
profiles on a new PC, but am having trouble making all three
useable within the same instance of Thunderbird. Can you help?
Both PCs are/were Windows-7 64 bit.Thunderbird only opens on the default if one profile
or
if Profile Manager is instructed to ask at startup it will allow you to choose which Profile to open else it opens on the last Profile used..
So it shows one Profile at a time in one instance of Thunderbird.
However, one Profile can have many mail accounts.
eg: I run 4 mail accounts in one Profile. -
I'm can't figure out how to add a new record with add instance, see below for basic code. The second one works but I can't re-create it. I'm guessing something basic that I am over looking.
I also can't figure out how to attached my pdf's so you have to download from my website.
Thanks,
Jay
http://www.atg.state.vt.us/assets/files/Adding%20a%20row%20-%20does%20not%20work.pdf (does not work - need help)
http://www.atg.state.vt.us/assets/files/Adding%20a%20row%20-%20works.pdf (this one works - I didn't create it)It looks as if you have saved the form as an Acrobat 7 STATIC form....you
need to save it as a DYNAMIC form. You will find that option in the file
types in the save as dialogue. I resaved it locally and your form works.
Hope this helps -
Read an Attachment attached within a process instance
Hi
I am using BPM 11.1.1.6, can someone tell me how do I read and parse an attachment attached within a process instance. Thank you.
Regards
VenkatThank Sudipto for the link.
Experts,
I used the API as suggested in the first link and managed to iterate through the attachments attached in a process instance but when i am trying to read the attachments using the getInputStream() its returning null, all the other properties of the taskattachment returns correct information. Is this a known bug?? The sample code snippet is as below:
List attach= task.getAttachment();
int i=0;
for (Object obj :attach){
i=i+1;
AttachmentType taskAttachment = (AttachmentType)obj;
System.out.println("Task Attachment " + i + " " + taskAttachment.getName());
System.out.println(taskAttachment.getMimeType());
System.out.println(taskAttachment.getSize());
InputStream inpStream= taskAttachment.getInputStream();
if (inpStream == null){
System.out.println("Stream is empty");
}
Maybe you are looking for
-
My mac is running at 175 Fahrenheit? Why so hot?
My mac is running at 175 ferhenheit? Its running really slow and I have to turnn it off frequently to let it cool down. Any solutions out there?
-
IPhoto quits unexpectedly and does not allow me to update
When I open iPhoto, I am prompted to upgrade: "The photo library needs to be upgraded to work with this version of iPhoto." Before I even have the opportunity to click Upgrade, the application quits: "The application iPhoto quit unexpectedly." When I
-
How to design Distributed transaction?
Hi I have distributed transaction that involve MQ and two oracle database. In both database I have stroed procedure that have their own rollback points. My requirement is that either both database shoulb committed or none. For this to implement I hav
-
Hi, I'm fairly new to jms and was wondering what are the advantages of using SOAP vs any xml parser (xerces, jaxb) and sending it as a regular text message? Thanks
-
HT4623 when i update my iphone 3g 4.1 to 4.2 it is hanging and not working now
tell me plzz what m i do now now i m so confused that what shoul i do now?