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

Multiple UI Rules

Highlighted
john.jeremiah
Occasional Contributor

Multiple UI Rules

Is there a way to create a single Advanced Rule that applies two UI Rules?    

 

I have a situation where I want to set a field to be both Visible and Required...  and when I use the two UI Rules in the same Advanced Rule... as in:

 

setFieldVisible(true)

setFieldRequired(true)

 

Neither of the rules appear to process.

 

Any suggestions?

 

Thanks


John

4 REPLIES
Utkarsh_Mishra
Honored Contributor

Re: Multiple UI Rules

Hi John,

 

The code must be as:

 

setFieldVisible(true);setFieldRequired(true)

 

There must be a semi colon in between and also set the dependency and Result feilds correctly.

 

 

Regards,

Utkarsh

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
Sascha_1
Member

Re: Multiple UI Rules

Hello,

 

i have a question to that topic.

 

I added a advanced rule, which will make a field visible depending to a drop down field. Therefore i used the setFieldVisible(true) command.

The problem is, the field never gets visible by this rule.

 

To check if the UI Rules work generally, i changed the rule to setFieldEditable(true) and set StatusDependecies of the affected field to visible. After that, the rule works fine and the field gets editable.

 

So, is there a known bug by trying to set a field visible using setFieldVisible(true) rule???


Regards

Sascha

Ted Power
Occasional Contributor

Re: Multiple UI Rules

Hi Sasha,

 

The status dependencies take precedence over any rules.

 

The workaround is to make the field editable in the status dependencies, you can then create another rule to make the field not-editable on page load.  Then your existing rule should work.

 

Ted

Kerim KILIC
Frequent Visitor

Re: Multiple UI Rules

right u need to enable status dependecy, then in order make editable, then required. 

other way is working u can just make invisible the field.

//Add this to "OnDomLoad" event