Solved

JavaScript: If statements- HELP

Posted on 2006-10-27
2
231 Views
Last Modified: 2010-04-16
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
Comment
Question by:rlucaj
2 Comments
 
LVL 1

Accepted Solution

by:
Anubhavxgoel earned 50 total points
ID: 17832109
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
 

Author Comment

by:rlucaj
ID: 17850277
Thanks for the help, I got it to work.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Batch file output 20 77
scoresClump  challenge 31 108
strDist challenge 35 84
index Out OF Range Exception error 4 31
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now