How to call displayoption pre Javascript at FC! (347 Views)
Reply
Frequent Advisor
Posts: 35
Registered: ‎04-17-2011
Message 1 of 7 (347 Views)
Accepted Solution

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!

Honored Contributor
Posts: 5,881
Registered: ‎11-10-2008
Message 2 of 7 (341 Views)

Re: How to call displayoption pre Javascript at FC!

Hello

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

Frequent Advisor
Posts: 35
Registered: ‎04-17-2011
Message 3 of 7 (337 Views)

Re: How to call displayoption pre Javascript at FC!

please help me in detail  how todo. thanks!

Honored Contributor
Posts: 5,881
Registered: ‎11-10-2008
Message 4 of 7 (333 Views)

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
Posts: 35
Registered: ‎04-17-2011
Message 5 of 7 (322 Views)

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
Posts: 35
Registered: ‎04-17-2011
Message 6 of 7 (315 Views)

Re: How to call displayoption pre Javascript at FC!

I was using wrong file varible in FC !

Honored Contributor
Posts: 5,881
Registered: ‎11-10-2008
Message 7 of 7 (305 Views)

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

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.