How to call displayoption pre Javascript at FC! (233 Views)
Reply
Advisor
Ssyedzahir
Posts: 32
Registered: ‎04-17-2011
Message 1 of 7 (233 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!

Please use plain text.
Honored Contributor
Vadim Gorda
Posts: 5,632
Registered: ‎11-10-2008
Message 2 of 7 (227 Views)

Re: How to call displayoption pre Javascript at FC!

Hello

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

Please use plain text.
Advisor
Ssyedzahir
Posts: 32
Registered: ‎04-17-2011
Message 3 of 7 (223 Views)

Re: How to call displayoption pre Javascript at FC!

please help me in detail  how todo. thanks!

Please use plain text.
Honored Contributor
Vadim Gorda
Posts: 5,632
Registered: ‎11-10-2008
Message 4 of 7 (219 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.

Please use plain text.
Advisor
Ssyedzahir
Posts: 32
Registered: ‎04-17-2011
Message 5 of 7 (208 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;

}

Please use plain text.
Advisor
Ssyedzahir
Posts: 32
Registered: ‎04-17-2011
Message 6 of 7 (201 Views)

Re: How to call displayoption pre Javascript at FC!

I was using wrong file varible in FC !

Please use plain text.
Honored Contributor
Vadim Gorda
Posts: 5,632
Registered: ‎11-10-2008
Message 7 of 7 (191 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

Please use plain text.
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