Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

ShowMessage UI Rule

Highlighted
Jamie Pick
Regular Collector

ShowMessage UI Rule

We're using the showMessage() Advanced UI Rule to validate a date field (ensuring it is in the past). The 2nd parameter of showMessage() is set to "false", preventing the request from Saving or Transitioning - depending on what event the rule is setup on.

Problem: the message appears as it should, but the request continues on regardless of this parameter value being set to "false". I'm seeing this on both the Set Before Transition and Set Before Save. Has anyone else had any luck with these UI edits?

Thanks,

Jamie
9 REPLIES
Mahen M
Honored Contributor

Re: ShowMessage UI Rule

Can you kindly share the snap of the Rule?

Is your Rule Logic set to 'SQL Default'?

is your message in the following format?

showMessage('Message', continueProcessing=false)

Regards,
Mahendran M
Jamie Pick
Regular Collector

Re: ShowMessage UI Rule

Thanks for the reply, I've attached a screenshot of the rule. As far as I can tell, it matches the syntax shown in the examples in the Config Guide.
Mahen M
Honored Contributor

Re: ShowMessage UI Rule

The command in a different place shows something like this.

showMessage('Message'),continueProcessing=false

Regards,
Mahendran M
Mahen M
Honored Contributor

Re: ShowMessage UI Rule

As per the document, this UI Rule does NOT prevent the request from saving.

By Preventing the request from saving, I mean to say if a request has a blank mandatory field, If I try to save the request or try to hit a action button, I will get a message like 'You must provide a value for the field "X" to complete the Validation'

But for this Rule the document says:

'When a user clicks Save on the request detail page, or clicks a workflow â actionâ button (which saves the request before processing the workflow action), then any rules defined for this event are
processed before the save request is submitted.
The â showMessage()â function can cancel the request save if the rule is not satisfied.'

I suspect the second message it no where says that request will be prevented from saving. Only the value in 'Date Identified:' is not saved.

We have done this case in HP 7.5 Training. Let me know whether I am wrong, I dont have 7.5 Instance to validate this case.

Regards,
Mahendran M
Jamie Pick
Regular Collector

Re: ShowMessage UI Rule

I have this syntax right now and it still does not prevent the rule from transitioning...

showMessage('Date Identified can be the current date or in the past.', continueProcessing=false)
Jamie Pick
Regular Collector

Re: ShowMessage UI Rule

In your last explanation you mentioned the Apply Before Save functionality, which appears to work in the testing I'm doing. However, the Apply Before Transition does not appear to stop the transition from happening, as I mentioned in my previous post. The message appears and then the request moves on to the next step in the Workflow. Hmm...
Erik Cole
Honored Contributor

Re: ShowMessage UI Rule

Hi Jamie,

This is a bug fixed in SP3:

4000345666: Demand Management
PROBLEM:
When a transition is not validated, the workflow still continues to the next step. (202930)

I have both 7.5.2 and 7.5.4 instances for QA. I tested the "Before Transition" rule in both and found that it does NOT work in the .2 but it DOES work correctly in the .4 one:

showMessage('Message here.', false)

Hope this helps.
Mahen M
Honored Contributor

Re: ShowMessage UI Rule

wow, Thanks a lot for the info. This explains everything.

Regards,
Mahendran M
Linde IS Tools
Super Collector

Re: ShowMessage UI Rule

Hello Mahen,

I am trying to apply a same kind of a rule where "a Project should start only after a Proposal is finished",but I am not getting any message even if I select a "Project Start Date", which is smaller than "Proposal End date". i am attaching the screenshot of the Rule that I have applied, for reference.Please let me know if any changes need to be done.

(We are using PPM 9.12)

Thanks in advance,

Abhisek

//Add this to "OnDomLoad" event