• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
4

Workflow approval

Explorer ,
Oct 24, 2023 Oct 24, 2023

Copy link to clipboard

Copied

I have been reading through the community posts and can't find an answer that covers my specific requirement.

I have a form to be completed across multiple areas of our organisation. However,  if Area1 completes the form then it must be sent to Person1 for approval, however, if Area2 completes the form then it must be sent to Person2.

 

I tried using the following, predicated on Area2 being checked or not checked, but when I hit the submit button person2's email is always populated in the email to address field regardless of the check button being on or off, so I am not sure what my error is :

 

var cToAddr1 = "person1@organisation.com"
var cToAddr2 = "person2@organisation.com"
var a1 = this.getField("Area2")

var cSubLine = "Form to be Approved"
var cBody = "Please find attached my Form for your approval"

 

if (a1 == "Off" )
 this.mailDoc({bUI: true, cTo: cToAddr1, cSubject: cSubLine, cMsg: cBody});

else
{

this.mailDoc({bUI: true, cTo: cToAddr2, cSubject: cSubLine, cMsg: cBody});
}

 

Any help would be greatly appreciated.

🙂

TOPICS
PDF forms

Views

109

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 24, 2023 Oct 24, 2023

Copy link to clipboard

Copied

Use:

var a1 = this.getField("Area2").value;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 24, 2023 Oct 24, 2023

Copy link to clipboard

Copied

LATEST

Grrrr I knew it was something that simple. 

 

Thank you very much that worked wonderfully.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines