The PBO for each screen of the Master-Record Addendum application is defined in the SynR3.js file. If the user wishes to add additional conditions for display, these cannot be added in SynR3.js. However, it is possible to add them using the ADDITIONAL_PBO function. This function can be defined either in the database object or by using the Screen object. An example using ADDITIONAL_PBO with a Database objects is shown below:
g_WorkOrderAppDesc.Addendum.Database = [
{label:"Order",fieldname:"g_wo_no",displaywidth=8,fieldlength=10,sharedfield:1},
{label:"Activity",fieldname:"g_wo_activity",displaywidth=8,fieldlength=10,sharedfield:2},
{label:"Location",fieldname:"g_wo_location",displaywidth=8,fieldlength=30},
{type:SCR_FNCTION,funcname:ADDITONAL_PBO,callback:function( )
{var control1 = new JControl(this.m_RealTimeScreen,"g_test",SCR_EDIT);
if(objControl1 != null)
objControl1.SetAttribute(EDIT_STYLE_HIDDEN);
} } ]
An example using the screen object is shown below:
SR3_arTransactions["iw32"].m_ScreenObjects[0][8] =
{type:SCR_FUNCTION, funcname:ADDITIONAL_PBO, callback:function( ) { var objControl1 = new JControl(this.m_RealTimeScreen,"g_test",SCR_EDIT);
if(objControl1 != null)
objControl1.SetAttribute(EDIT_STYLE_HIDDEN);
} }