HPE Service Manager / Service Center Support and News Forum
Showing results for 
Search instead for 
Do you mean 

How to call displayoption pre Javascript at FC!

SOLVED
Go to Solution
Highlighted
Frequent Advisor

How to call displayoption pre Javascript at FC!

I have a Pre Javascript in displayoption which is used for some field to make mandatory etc...(a matrix calculation) at format.

And I have a validation at FC for those fields.

 

But i want to validate those fields (thru FC) after checking condition from Pre JS(in displayoption) first.

 

Please help me if their is any method to achieve this?

thanks in Advance!

1 ACCEPTED SOLUTIONS
Honored Contributor Honored Contributor

Re: How to call displayoption pre Javascript at FC!

As i was writing before , instead of $L_file it will be $file in the fc JS code. Replace it and check

6 REPLIES
Honored Contributor Honored Contributor

Re: How to call displayoption pre Javascript at FC!

Hello

Take the script from the button and put it in the FC.

Frequent Advisor

Re: How to call displayoption pre Javascript at FC!

please help me in detail  how todo. thanks!

Honored Contributor Honored Contributor

Re: How to call displayoption pre Javascript at FC!

Can you post the script here?

The main difference will be that Displayoption and FC are using different file variables. So you will have to change the variables  and use the script on the Jaavscript tab of the format control.

 

If it was doing the check for you in DO then it must work in the fc as well.

Frequent Advisor

Re: How to call displayoption pre Javascript at FC!

I am using same code in FC Javascript with Delete condition (user.validated.change in $file) but throwing error (attached);

 

JS:

if (system.vars.$L_file.user_validated_change_impact_question5==true)
{
vars.$user_validated_change_document5=true;
vars.$user_validated_change_document2=true;

}
else if (system.vars.$L_file.user_validated_change_impact_question5==false)
{
vars.$user_validated_change_document5=false;
vars.$user_validated_change_document2=false;

}
if (system.vars.$L_file.user_validated_change_impact_question4==true)
{
vars.$user_validated_change_document14=true;
}
else if (system.vars.$L_file.user_validated_change_impact_question4==false)
{
vars.$user_validated_change_document14=false;
}
if (system.vars.$L_file.user_validated_change_impact_question3==true)
{
vars.$user_validated_change_document8=true;
vars.$user_validated_change_document9=true;
vars.$user_validated_change_document10=true;
vars.$user_validated_change_document11=true;
vars.$user_validated_change_document6=true;
vars.$user_validated_change_document13=true;
vars.$user_validated_change_document1=true;


}
else if (system.vars.$L_file.user_validated_change_impact_question3==false)
{
vars.$user_validated_change_document8=false;
vars.$user_validated_change_document9=false;
vars.$user_validated_change_document10=false;
vars.$user_validated_change_document11=false;
vars.$user_validated_change_document6=false;
vars.$user_validated_change_document13=false;
vars.$user_validated_change_document1=false;

}

Frequent Advisor

Re: How to call displayoption pre Javascript at FC!

I was using wrong file varible in FC !

Honored Contributor Honored Contributor

Re: How to call displayoption pre Javascript at FC!

As i was writing before , instead of $L_file it will be $file in the fc JS code. Replace it and check