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

Hide a section with rules?

Highlighted
Andy McMahon_1
Collector

Hide a section with rules?

Hey guys, 

I feel like I've covered this before, but, based on criteria on my request type, I'd want to hide an entire section.  

I know how to do that.... the question is, is there a way to hide that sections header?  For instance, I'd like to hide an entire section called "Solution 2".  When I put the rule in place, the header of the section shows up, expanded, but blank.  Any suggestions?  

7 REPLIES
dirkf
Honored Contributor

Re: Hide a section with rules?

Hi Andy,

 

I've spent hours testing and pouring over this one a while ago - it's not possible - even in an export to pdf, the empty section will appear. You can hide all fields, but not a section header (at least not with out-of-the-box tools).

 

I was about to advise on the slim chance of an ER, then  found it already existing: QCCR1L39659 (deferred as expected), logged for 8.02:

http://support.openview.hp.com/selfsolve/document/FID/DOCUMENTUM_QCCR1L39659

 

DETAILS

We cannot hide an entire section via Rules.  We can hide all individual fields within a section but the section header name still remains.  We want to be able to hide the fields AND the section header name.


SCENARIO

Management has required that all departments use the same form for requesting work.  Therefore, the request type has separate sections for certain processes.  A customer is requesting that some fields and sections are hidden based on the value of another field.  For example, if our 'Migration Process' field has a value of PeopleSoft, then all fields in our ImageNow and ITGC sections are hidden since they are not related.  It would be cleaner if also the section header would be hidden to avoid confusion.



WORKAROUND

HP technician recommended hiding an entire section via Status Dependencies and then using Rules to Unhide the fields needed.


UNACCEPTABLE

We have decided that the above workaround would be too much overhead and maintenance.


REQUIRED

Allow hiding of an entire request section via Rules.


Sorry for not being able to convey better answers.

Have a great day.

Best regards,

Dirk

 

Erik Cole
Honored Contributor

Re: Hide a section with rules?

You could maybe create a custom javascript rule that could be passed a section name and a t/f bit to do this. You'd have to see the jsp code of a request page and see how they do it when you click the little + sign....just an idea...

Kerim KILIC
Frequent Visitor

Re: Hide a section with rules?

hi,

 

below an example for how to do a ui rule for expand/collapse, if you find how to hide section name via jsp code, this will give you an idea

 

Following is what was added to our RequestRulesUserLibrary.js file.

function expandCollapseSection(sectionName) {
if (isSectionExpanded(sectionName)) {
collapseSection(sectionName);
} else {
expandSection(sectionName);
}
}

function collapseSection(sectionName) {
if (!isSectionExpanded(sectionName)) {
return;
}
}

function expandSection(sectionName) {
if (isSectionExpanded(sectionName)) {
return;
}
}

function isSectionExpanded(sectionName) {
result = false;
var imageElement = document.getElementById('IMAGE_' + sectionName);
if (imageElement != null) {
result = (imageElement.src== collapseImg.src);
}
return result;
}

To use the above UI Rule, you just need to know which section you want to expand or collapse, and enter its value.

Below is an example where we are expanding one section and collapsing three others:

expandSection('EC_SUBSECTION_EC_REQUEST_DETAILS_4'); collapseSection('EC_SUBSECTION_EC_REQUEST_DETAILS_3'); collapseSection('EC_SUBSECTION_EC_REQUEST_DETAILS_2'); collapseSection('EC_SUBSECTION_EC_REQUEST_DETAILS_1');

Andy McMahon_1
Collector

Re: Hide a section with rules?

I guess I'm not sure where I would put this rule... Any help?

 

Is the value of the section as simple as "Solution Proposal 1"? 

Andy McMahon_1
Collector

Re: Hide a section with rules?

Dirk, 

Crazy thing, I just hid the entire section with Status Dependencies.  

Rules won't make it visible.  For a sanity check, this is the UI rule I'm using.  

Apply on field change. When "Number Of Solutions:" is 2 then make (LIST OF FIELDS) visible... Here's the UI Rule. 

setFieldVisible(true);setFieldEditable(true);setFieldRequired(true)

 

Am I doing something wrong?  

MaxH
Member

Re: Hide a section with rules?

Did Dirk ever answer this privately?  I am looking for this same solution and our Management team is requesting this as well.  Does anyone know if hiding a section is possible?  How about "unhiding" it at the right time?  Thanks.

d4y4n4
Frequent Visitor

Re: Hide a section with rules?

Hi Max,

I did some testing and there is no way to hide a whole section in request detail page

Regards,
Dayana
//Add this to "OnDomLoad" event