Expand my Community achievements bar.

Auto populate field from field in sub form

Avatar

Level 2

Hello all,

I was able to get great help from a previous question I uploaded. I have a new question regarding auto populating a field from the value of another field that is on a different subform. I need to get the value of the CompanyName field plus some additional plain text into the subject line of the email submit. There is a field on the subform EmailOptions called fldSubject that controls the subject line text. So that when the receiver of the form gets the email with the attached PDF, the subject line will be the company name and the title of the form. The email submit button and options I was able to find within the Adobe forums as well.

Link to Form

https://southamptontownny.box.com/s/szkxzrkwbast8cgdquv59qr7w82fdftl

Thanks in advance.

2017-12-04_AutoPopulateFieldAcrossSubForms.jpg

2 Replies

Avatar

Level 10

To create the subject just add the following script to the calculate event of the Subject field:

this.rawValue = (ApplicantInfo.CompanyName.isNull ? "" : ApplicantInfo.CompanyName.rawValue) + " " + event.target.documentFileName.replace(/\.pdf/i, "");