Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

JavaScript: If statements- HELP

Posted on 2006-10-27
2
235 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

809 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