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

Rules for text field

Highlighted
rinuvarghese
Occasional Contributor

Rules for text field

Hello,

 

We have a auto complete list 'Month_list' which displays all the months in a year.We also have 12 Yes/No drop down fields with lables as month names (January till december).

 

If a user selects a month in Month_list , we should make the drop down list with labels as previous month till December be visible and editable for user.remaining all months should be non-editable. For eg: if the users selects the month August, we should make the fields with labels July till Dec as visible and editable whereas the fields Jan till June should be non-editable/non-visible.

 

WE have also tried this using table componenet having two columns Month(with values Jan till Dec) and Value. In this case, we have to compare the selected month with the value in the text field and accordingly make the field non-editable. However we are not able to compare the column header in table comp with a text field.

 

Can anyone please suggest how can we add rules to accomplish this?

 

Any help is appreciated.

 

 

Thanks

Divya

 

5 REPLIES
randull
HPE Expert

Re: Rules for text field

Hi,

 

There are some problems with the UI rules and the table components. Here is an Enhancement request for it,

 

http://support.openview.hp.com/selfsolve/document/LID/QCCR1L51382

 

I think that's the problem you are having. The rules are not working fine with Table component you have.

 

 

Best regards,
Randall

-- Remember to give Kudos to answers! (click the KUDOS star)
"If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
teetotal
Occasional Contributor

Re: Rules for text field

You can write your own user rule function in RequestRulesUserLibrary.js

Utkarsh_Mishra
Honored Contributor

Re: Rules for text field

I think on Request page you can manage your requiremnt by using UI rule, you need to play with the Dependencies in UI rules.

 

The Problem with UI rule is that once you Hide it; you need to create seperate new rules to SHOW it as well.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
rinuvarghese
Occasional Contributor

Re: Rules for text field

Thanks to all of you for your replies.

 

we are planning to have these fields as 12 separate drop down fields(with lables Jan till Dec) as rules not working properly for Table component. However in this case, if we include UI rule to show fields on field change event, we had to include 24 rules(12 for showing fields based on selected month and remaining 12 for hiding fields based on selected month) which I do not think is a correct option.

 

Please suggest of there is any other way to write UI rules for these fields so that the number of rules can be decreased.

 

Thanks,

Divya

randull
HPE Expert

Re: Rules for text field

Hi,

 

I guess your approach is the correct one. I don't see a way to reduce the number of rules.

Please go ahead with your solution.

Best regards,
Randall

-- Remember to give Kudos to answers! (click the KUDOS star)
"If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
//Add this to "OnDomLoad" event