• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

JavaScript: If statements- HELP

Hello everyone,

We are running Adobe Workflow for our Client Intake process.

Process goes as such:

1. Process is initiated
2. Goes to Conflicts Group
3. Then it goes to 2nd Conflict Clerk

I'm trying to create an email trigger to go out to to the Conflicts Group, only if the 2nd Conflict Clerk rejects their form. I've been unsucessful thus far.

Here's my code:

var someInstructions = "";

if (WorkItem.previousWorkItem.name == "2nd Conflict Clerk")
{
      someInstructions = WorkItem.getFieldValue("clname1") + "- Conflict Process Rejected for " + WorkItem.getFieldValue("rpmbillatyname") + " Please Re-submit";
}
else

WorkItem.instructions = someInstructions;
0
rlucaj
Asked:
rlucaj
1 Solution
 
AnubhavxgoelCommented:
ok,

The issue could very well be in the concatination that you are trying to perform.
All languages suggest that we validate the text before appending.

If WorkItem.getFieldValue("clname1")  is null or "undefined" as javascript choses to call it :) , or even WorkItem.getFieldValue("rpmbillatyname")  has same issue, then you could be in trouble, so please get these values seperately and verify them before concatenating.
Let me know if this helps, else I would need details of how you found out that "WorkItem.instructions=..." did not work ?

cheers!
0
 
rlucajAuthor Commented:
Thanks for the help, I got it to work.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now