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: 

Save request requires populating required fields..

Highlighted
hyllplan
Frequent Visitor

Save request requires populating required fields..

Hi

We want to be able to save requests without having to populate required fields. We had it working in 7.5. How can this be done in 8.02 (Windows)

BTW, the search function isnt any good in this forum right? The hits I get sometimes make sence sometimes not. If Im trying to search for my own stuff I dont get a hit dispite that I even copied the actual Subject. Too bad.

Thanks
Johan
5 REPLIES
Jason Nichols K
Honored Contributor

Re: Save request requires populating required fields..

Johan,

There are a couple of ways you can approach this. One is use the "look ahead page" feature of PPM where it will prompt for fields that are required at the next step but do not have any value set. You can also use this same functionality using the Reconfirm status dependency. The other option is to use the UI Rules where you leave the fields not set to be required on the status dependencies, but setup a Rule that triggers on transition with the status you are currently on to then make the field required. This will cause the user to have to fill in the field before they can continue to the next step.

Jason
hyllplan
Frequent Visitor

Re: Save request requires populating required fields..

Thanks Jason, Im aware of such functionality, the problem is that:
1) You will not be able to show the user the red star (required field), could be annoying if there are several required fields.
2) We have a *lot* of RT that are already in use, this would require a lot of re-work.
Thanks though
/Johan
Jason Nichols K
Honored Contributor

Re: Save request requires populating required fields..

Johan,

I have another option, and yes it will take re-work, but any option will. This option will be to leave your required fields in place, but use the Apply before Save Rule and use UI rule to unrequire the fields. This will leave your red asterisks on the form. This will also require you putting in Rules to make the same fields required On Transition because the On Save rules will trigger on transition too. You will just have to put the transition rules after the save in the Rule list.

Jason
hyllplan
Frequent Visitor

Re: Save request requires populating required fields..

Thanks again Jason, pretty smart solution, but I want a more general one. This is what we used in 7.5. To be honest I havent even tried it in 8.02 I have just assumed it wont work....:

\server\Prod\deploy\itg.war\web\knta\crt\RequestDetail.jsp

*** Standard code from HP

function saving() {
document.rdf.ACTION.value = 'SAVE';
if(!duringProcessing)
{
duringProcessing = true;
<% if (!isEmbeddedForSRC) { // buttons are hidden if embedded %>

disableDetailButtons();
<% } %>
% if (browserType.equals(WebUtils.IE))
{ %>
validateComponentsrdf();
<% } else { //NS7 display hack %>
setTimeout("validateComponentsrdf()", 100);
<% } %>
}
}


*** New version that makes it possible to save with empty required fields


function saving() {
document.rdf.ACTION.value = 'SAVE';
if(!duringProcessing)
{
duringProcessing = true;
<% if (!isEmbeddedForSRC) { // buttons are hidden if embedded %>
// Set the global variable checkRequired in CompValidation.js to false, so checking
// null values for required components will be skipped.
checkRequired = false;
disableDetailButtons();
<% } %>
% if (browserType.equals(WebUtils.IE))
{ %>
var before = function() {checkRequired = false;};
var after = function() {checkRequired = true;};
validateComponentsrdf(before, after);
checkRequired = true;
<% } else { //NS7 display hack %>
setTimeout("validateComponentsrdf()", 100);
<% } %>
}
}
Jason Nichols K
Honored Contributor

Re: Save request requires populating required fields..

Johan,

In theory, what you had done for 7.5 should work for 8.0 since Demand Mgmt wasn't really targeted for any major revisions in 8.0. Using the OOTB JS functions allows your solution to be forward compatible with future releases where changing the JSP may not. I would go ahead and try your 7.5 fix and see if it works for you. If it doesn't, then I would suggest the UI Rules.

Jason
//Add this to "OnDomLoad" event