The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Using UI Rules

SOLVED
Go to solution
Highlighted
Ryan Grobler
Regular Collector

Using UI Rules

Hi All

I am trying to play with the workflow for a request.

The basic set up is I have 2 fields which are relevant to projects.

The first is 'Central IT Resources Required' with a 'Yes/No' Validation.

If the answer is 'no' then the project can be created; but if the answer is 'Yes' then another field 'OLT approval' must be populated; and I am trying to use the UI Rules for this, but I am not sure how to write them.

The token is HC_OLT_APPROVED; so what is the UI rule to make it mandatory, the help text says it is 'setFieldRequired(TRUE)' but that doesn't do anything.

What am I doing wrong?
8 REPLIES
Sascha Mohr_1
Esteemed Contributor

Re: Using UI Rules

Hi,
you need to have the yes/no field in the dependencies section of a on-field-change rule, the ui-rule in the bottom right box and the second field in the bottom lift list.
The dependency should be set field "equals" yes.
Also check the status dependencies of the second field in the request type.
Ryan Grobler
Regular Collector

Re: Using UI Rules

I've set up the rule as you've suggested, but I get an error when I test it out.

Erik Cole_1
Esteemed Contributor
Solution

Re: Using UI Rules

Try

setFieldRequired(true)Result Fields: OLT Approved

in the UI rule box.
Ryan Grobler
Regular Collector

Re: Using UI Rules

Thanks Eric

Thanks works perfectly.

I am now struggling with adding an error message.

The set up is that if a field is 'no' the project can't be created, the rule I have says:

showMessage('Approval Not Granted', continueProcessing)

1) Do I need to have a field in the 'Results' section?
2) What do I need to do to get this rule working?

Thanks!

Ryan
Ryan Grobler
Regular Collector

Re: Using UI Rules

Right, I've got half of this right, I;ve changed the validation to :

showMessage('Approval not given', continueProcessing : True)

But I get an error on the Page saying: Error: Expected ')'

Where do I need to add the other bracket?
Sascha Mohr_1
Esteemed Contributor

Re: Using UI Rules

The syntax is like this:
showMessage('some text', true)
So just "true" without "continue_processing".
Ryan Grobler
Regular Collector

Re: Using UI Rules

Awesome, working!

Thanks!!!
Ryan Grobler
Regular Collector

Re: Using UI Rules

Closing
//Add this to "OnDomLoad" event