I ran across a Script function defined to copy a record from form to another.
function Copy_Record_To_Form()
See attached. I have two forms, each with hundreds of records which I add to frequently. The problem is they were made at different times for different reasons and both contain much of the same information. Is it possible to fill out a new record in one of the records and somehow copy the information that is common to both to the other Form? Going in one direction from one to the other, depending on which form gets filled out first and then need to fill out a record in the other form?
Attachments:
You must be
logged in to view attached files.
Whenever you use the record.getFieldValue(field_id);
command in a Field Script, Tap Forms will run that script whenever the value in that referenced field changes.
So you can have it triggered when you change some value in a form. That script can add a record to another form and copy the values from that record to the record in the other form.
I would recommend referencing the last field in your form thought to trigger running of the script. That way you can fill in all the fields in the record first, then when you get to the last field and enter in a value, your script will run and will copy all of the values entered in that record to the record in the other form.