0% found this document useful (0 votes)
6 views12 pages

Custom Property Handling in Scripts

The document contains scripts for a Callup page that manage a combobox with options 'START', 'STOP', and 'HOLD', each triggering different data values. It includes event handling for on-page completion, onchange events, and onclick actions in both JavaScript and VBScript, along with error handling and visual updates based on data values. Additionally, it discusses accessing custom properties and provides guidelines for handling specific conditions in the scripts.

Uploaded by

Vaishnavi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views12 pages

Custom Property Handling in Scripts

The document contains scripts for a Callup page that manage a combobox with options 'START', 'STOP', and 'HOLD', each triggering different data values. It includes event handling for on-page completion, onchange events, and onclick actions in both JavaScript and VBScript, along with error handling and visual updates based on data values. Additionally, it discusses accessing custom properties and provides guidelines for handling specific conditions in the scripts.

Uploaded by

Vaishnavi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Taking from custom property

For Callup page shape script.

Combobox script:

Onpagecomplete event

[Link]("START");

[Link]("STOP");

[Link]("HOLD");
//var a = [Link]("V600_OLOA269R_RJ_CM.CMB_HOLDER.pv");

if( combobox004=="START")

[Link]="V600_OLOA269R_RJ_CM.[Link]";

else if( combobox004=="STOP")

[Link]="V600_OLOA269R_RJ_CM.[Link]";

else if( combobox004=="HOLD")

[Link]="V600_OLOA269R_RJ_CM.[Link]";

}
Combobox : onchange event

if( [Link]=="START")

[Link]("V600_OLOA269R_RJ_CM.[Link]")=1;

else if( [Link]=="STOP")

[Link]("V600_OLOA269R_RJ_CM.[Link]")=2;

else if( [Link]=="HOLD")

[Link]("V600_OLOA269R_RJ_CM.[Link]")=3;

Onclick and OnCallout In VB :

On Error Resume Next


If [Link]("[Link]") = "ON" then
Imsg = Msgbox("Do You Want To Disable?",vbyesno)
If Imsg = vbyes then

[Link]("[Link]") = "OFF"

End If
End If
Onclick :

[Link] me ,"Do You Want To Fault Reset? " , 1 ,0


if Sc_AlpFLT002.DataValue("[Link]") = 0 then

end if

OnCallout:

Dim xResponse

xResponse = [Link]

if xResponse = "Y" then


Sc_AlpFLT002.datavalue("[Link]") = 1

else
[Link] = 1
end if

=================================================================
CDA:
SCADA:

GSH

function QAF3_832_Txt_textbox001_ondatachange(oSource)

var oShape;

oShape=[Link];

if (([Link]("Tagname.cp_PVFL")) && !
([Link]("Tagname.cp_PVFL"))){

if ([Link]("Tagname.cp_PVFL")== 0 &&
[Link]("[Link]") > 0) {

[Link] = "rgb(255,51,255)"; //Megenta


[Link] = true;

}else if ([Link]("Tagname.cp_PVFL") == 0 &&


[Link]("[Link]") > 0) {

[Link] = "rgb(255,51,255)"; //Megenta

[Link] = false;

}else{

[Link] = "rgb(0,0,0)"; //BLACK

[Link] = false;

}else{

[Link] = "rgb(255,255,255)";//White

[Link] = false;

}
function QAF3_CDAPCDI_Graph_AlpError3Tags_OnUpdate(oSource)

var oShape,iQualityGood;

oShape=[Link];

if (([Link] && [Link]("tagname2.cp_pv2") &&


[Link]("tagname3.cp_pv3") && iQualityGood)==iQualityGood ){

[Link]("TxtError").styleclass="TxtError_NoError";

else

[Link]("TxtError").styleclass="TxtError_InError";

function QAF3_CDA_GDS_Toxic_HH_Green_FP_V1_ondatachange(oSource)

var oShape;

oShape=[Link];

if([Link]("T_FLT.PARAM")== 1) {

[Link] = "rgb(255,0,255)";

[Link]("R1").[Link] = "hidden";

if([Link]("T_A.PARAM")== 1) {

[Link] = "rgb(255,0,0)";

[Link]("R1").[Link] = "hidden";

if([Link]("T_AHH.PARAM")== 1) {

[Link] = "rgb(255,0,0)";

[Link]("R1").[Link] = "hidden";
}

if([Link]("T_INH_FB.PARAM")== 1) {

[Link] = "rgb(255,255,0)";

[Link]("R1").[Link] = "hidden";

function typename(e){return null!=e?typeof e:"Nothing"}


//use this when you are using typename in your script…….
//Java Script

======================================================================================

function QAF3_CDAPCDI_RegCntlValve_AlpVal_OnUpdate_q(oSource)

var rVal,rClosed,oShape;

oShape=[Link];

rVal=[Link];

rClosed=([Link]("Num","ClosedValue"));

var a = [Link]("Page").GetStyleClassProperty("UseExtended_RegValve_range","key");

sRange = [Link]();

//sRange =
[Link]("Page").GetStyleClassProperty(("UseExtended_RegValve_range","key").toUpperCas
e());

if (sRange != "yes") {

if (rVal>105) {

rVal=105;

else if (rVal<-6.9) {

rVal=-6.9;

if ([Link]("TxtOP") == " ") {

[Link]("IndVal").value= rVal;

else

[Link]("TxtOP").innertext=[Link](rVal,1) + "%" ;

if (rVal > rClosed) {

index=[Link]("Style","cp_styleForOpen" );

else
{

index=[Link]("Style","cp_styleForClose" );

if (typename([Link]("PlgIn")) != "Nothing") {

[Link]("PlgIn").styleclass="PlgIn_" + index;

if(typename([Link]("PlgOut")) != "Nothing") {

[Link]("PlgOut").styleclass="PlgOut_" + index;

if (typename([Link]("WdgC")) !="Nothing") {

[Link]("WdgC").styleclass="WdgC_" + index;

VB Script

'----------------------------------------------------------------

'RegCtl Valves

'----------------------------------------------------------------

Sub PCDI_RegCntlValve_AlpVal_OnUpdate_q(oSource)

dim rVal,rClosed,oShape

on error resume next

set oShape=[Link]

rVal=[Link]

rClosed=csng([Link]("Num","ClosedValue"))

sRange = lcase([Link]("UseExtended_RegValve_range","key"))

if sRange <>"yes" then

if rVal>105 then

rVal=105

elseif rVal<-6.9 then

rVal=-6.9

end if

end if
if [Link]("TxtOP") is nothing then

[Link]("IndVal").value=rVal

else

[Link]("TxtOP").innertext=round(rVal,1) & "%"

end if

if rVal > rClosed then

index=[Link]("Style","cp_styleForOpen" )

else

index=[Link]("Style","cp_styleForClose" )

end if

if typename([Link]("PlgIn")) <> "Nothing" then [Link]("PlgIn").styleclass="PlgIn_" & index

if typename([Link]("PlgOut")) <> "Nothing" then [Link]("PlgOut").styleclass="PlgOut_" &


index

if typename([Link]("WdgC")) <> "Nothing" then [Link]("WdgC").styleclass="WdgC_" &


index

if [Link]<>0 and [Link] = 0 then [Link]


"PCDI_RegCntlValve_AlpVal_OnUpdate_q ->" & [Link] & " " & [Link]

end sub

When we are doing hardcode and we want to get something from custompeoperty then instead of
getCustomPropert use : "{%Value::FirstB%}"

You might also like