Article

rduym's picture
article
Reads:

2939

Score:
0
0
 
Comments:

0

Form Field Visibility after a Workflow Task is Claimed

Author Info

11 July 2007 - 12:57am
Submitted by: rduym

(View Disclaimer)

Problem

How can I make a form field visible only after a workflow task is claimed?

Solution

You can do this with a couple of lines of JavaScript. The trick is that until a task is claimed the action buttons like approve, deny, etc., are not present.

So, you can test for the presence of the approve buttons (they can be top, bottom, or both), and if they are not present, you can execute some form script, such as hiding a field. When the form is loaded, the field will show up for a second or so, but then it will be hidden once the script is executed.

Add this code to an onload event of one of the fields:

if (!dojo.byId("ApprovalAction") &&  !dojo.byId("ApprovalAction1") {
  // task is not claimed
  form.hide("afieldname");
}


Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

© 2012 Novell