Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #1 
I'm trying to get a popup/error window to tell the user to verify a field before submitting.  This error does not have to stop the process, just a reminder for the end user.  I also have this same field performing another code activity.

If i put ProcessContext.UserError = "insert message here"; at the end of the code activity, it does not update the other field that it is supposed to.

Scenario, check request form. 
Enter check value: <enter numbers here>
Dollars: <Auto populated text from check value here>

The Auto populated text from check value works until i put that UserError in the script.  Is there a way around this?

I've also tried setting this UserError message in the Dollars field "When changed" and it still won't work.
0
BMellert

Guru
Registered:
Posts: 688
Reply with quote  #2 
As you noted, UserError stops the activity with an "error" condition.
If I understand what you are trying to accomplish correctly, a client side script could validate you input, then pop-up using window.alert( your message ).  Once the user clicks OK processing will resume.
0
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #3 
I can't get window.alert(message); to work.  I keep getting "The name 'window' does not exist in the current context"
0
BMellert

Guru
Registered:
Posts: 688
Reply with quote  #4 
It needs to be a client side script with appropriate coding -- depending now how/when you want the box to pop up -- to make it fire.  It cannot work server side which I'm guessing is where you're trying to call it now.
0
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #5 
i'm calling it from a code activity under a "When changed" field

I am finding a lot of references to this
<script type="text/javascript">window.alert("You message goes here!")</script>
But that won't work for me either.
0
jpesout

Avatar / Picture

Veteran
Registered:
Posts: 107
Reply with quote  #6 
When changed is a server script, you need to call it form client script, On field exit in this case. You also don't need to put the code to <script> tags, these tags are unnecessary there.
0
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #7 
So in "On field exit" i put window.alert(message); and it deploys without an issue, it still runs my "When changed" script, but it won't run the "On field exit" for some reason.  Can metastorm run both of these fields?  Or am i using "On field exit" wrong?
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!