Hi there DMM,
I hope I understand what you are trying to accomplish. Do this on your mobile edition NOTE: BEFORE YOU TRY THE SCRIPT VERSION TRY THE MOVE OR COPY OPTION I LIST BELOW.
This is what I did:
In the Parent library I created two text fields - LastName, and Favorite Color and a Linked to Entry field to the Child library. (Relationship is One to Many)
In the Child library I created two text fields - LastName, Favorite Color, and an integer field called Age.
Then in the Parent library I created an Action script as follows:
Tap on Add javascript libraries
Place of Action is Entry view card
Script -
var there = libByName("Child")'
var newEntry = new Object();
newEntry["LastName"] = entry().field("LastName");
newEntry["FavoriteColor"] = entry().field(FavoriteColor");
there.create(newEntry);
This script will copy the LastName and Favoritecolor fields from the Parent library to the Child library. If you have more fields in the Parent library that you want to copy to the Child library just enter them the same as above. (newEntry["Your field name in Parent library"] = entry().field("Your field name in Child library")
Then in the Child library you enter the age and link the entry to the Parent library entry.
Do this as follows:
In Parent library create a new entry.
LastName = Doe
FavoriteColor = Blue
Create the entry.
Once created tap on the "Doe" entry, then tap on the arrow in the upper right corner. This action creates an entry in the Child library. Close Parent library, open Child library. Tap on pencil for the entry and edit accordingly. You link this entry to the parent entry at this point as well.
If you want to copy more than one field you could also try this method....might be simpler and doesn't involve scripting. MOVE OR COPY OPTION
1. Tap on your entry in the Parent library.
2. Tap on three dots in upper right corner.
3. Select Move or Copy
4. Tap on Blue + at bottom right corner.
5. Select your Child library.
6. All you fields will be listed. For example the field LastName in Parent library will be copied to LastName field in Child library. You can define the field to copy to by tapping on the entry.
7. At the bottom of the mobile device screen check the box Create a copy and then save.
8. Hit back arrow.
9. Tap three dots in upper right corner again, tap Move or Copy. A message at the bottom should appear to say a An entry has been copied to the Child library.
10. Tap on pencil. tap on lines in link to entry, and tap on corresponding name to link the entries. Then edit the Child entry as desired.
If you don't like this method, go ahead and try the script method.
Beth