Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to compare and copy the fields from repeating subform to another subform, same structure.

Avatar

Level 8

Dear All,

I am using LiveCycle Designer 8.2.

I have the following requirement, and did not figure out the best way to implement it using JavaScript.

The Form has, say, Subform A with Repeating Inner Subform, say it has the Education History of the Staff.

I want to put another Subform B, with similar structure to From A, and create a button/function to copy the field data values from A to B.

Subform A will show the user the fields of education with Read-Only Mode.

Subform B will show the user the same data values with write-enable mode. This subform will allow the user update his Education Records.

The fields are:

0. Staff ID: Text (Key 1) (always read-only and hidden, becuase it is on the main form),

1. Degree: Text,

2. Specialization: Text,

3. Institution: Text,

4. Start Date: Date (Key 2),

5. End Date: Date.

Another function is needed is to compare the same records between form A and Form B.

(Note: The Education record of a Staff has primary key of Staff ID and Start Date. Meaning, the Staff cannot have tow different degrees in starting on the same date.)

The user may change the Institution in form B or change the Degree. I need to highlight, on Subform B, the row which was changed or added by the user. This means I need to do lookup against Subform B using the Key Values from Subform A.

I have already developed the Form, and I have about 5 Subforms to allow updated by Staff: Education, Experience Inside the company, Experience Outside the company, Job Skills, Membership Record, ..etc. One thing I did is that the Field Names I used in Subform A are not the same of the fieldname in Subform B, but the have same suffix, and different prefix. For example, for the Education:

Subform A - Original Values:

1. Degree: OrgDegreet,

2. Specialization: OrgSpecialization,

3. Institution: OrgInistitution,

4. Start Date: OrgDateStart (Key),

5. End Date: OrgDateEnd.

Subform B - Updated Values:

1. Degree: UpdDegreet,

2. Specialization: UpdSpecialization,

3. Institution: UpdInistitution,

4. Start Date: UpdDateStart (Key),

5. End Date: UpdDateEnd.

I understand if the Key field is updated, then it is like it was deleted, and added a new one.

I know how to do that in ASP.NET, but need help in Adobe LiveCycle using JavaScript.

Please help me to write these two functions, as they are very urgent requirement.

Tarek.

0 Replies