Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA Enterprise SCADA

Add a CustomServerProcess element

  • Last UpdatedApr 24, 2025
  • 2 minute read

The CustomServerProcess element is used when you require custom functions to support table editing. The CustomServerProcess element is defined at the beginning of the DataSetTable element before declaring any Fields element, and after any table or row declarations. When used, the CustomServerProcess element must have at least one element embedded in it. The embedded element can be either the ProcessPopupForm element or the DOMI element.

After you add the CustomServerProcess element to a Form, the Advanced Database Editor (ADE) adds a Functions menu to the form that affects both the Table Edit Form and the Row Edit Form.

The CustomServerProcess element forces Administrators to use the Functions menu to insert or delete records. The CustomServerProcess element provides additional logistics in creating a new form or performing certain routines before removing a record from the RealTime database (RTDB).

In this example, the default creation of one point is bypassed in order to create a set of points. The CreateNewRecord function is configured using the farmsPopup class. The method to execute does not serve a role: instead, the buttonAccept_Click() method initiates creation of the set of points. The farms table uses the CreateNewRecord function to invoke the farmsPopup class, as the standard method of point creation cannot be used to create new records. The DBEdit XML code is defined as follows:

<DataSetTable

Name="farms"

Description="Farms Table"

IsDeleteDisabled="false"

IsAutoGenDisabled="false"

IsInsertDisabled="true"

LabelDisplayWidth="100"

DataDisplayWidthMin="100"

DataDisplayWidthMedium="200"

DataDisplayWidthMax="300">

<CustomServerProcess

ToolTipText="Create New Farms Record"

Label="Create New Record">

<ProcessPopupForm

Assembly="OASySDNA.DBEditHelperForms.Farms"

Class="farmsPopup"

Method="CreateNewRecord"/>

</CustomServerProcess>

…

</DataSetTable>

Code Example

public partial class farmsPopup : ADEBaseEditFormPopUp

{

private IDNAEnvironment DNAEnvironment { get; } = Common.DNAEnvironment.Instance;

public farmsPopup() : base()

{

InitializeComponent();

}

public farmsPopup(object[] argsIn) : base(argsIn)

{

InitializeComponent();

}

public void CreateNewRecord (object[] argsIn)

{

}

// The real work is started after the user enters data in TextBox

// Objects in the form and hits the Accept button.

private new void buttonAccept_Click(object sender, EventArgs e)

{

if (CallFNPut())

{

base.buttonAccept_Click(sender, e);

}

}

…

}

For this feature to work correctly, certain DataSetTable element attributes must be set properly to prevent Administrators from creating or deleting a record using the normal method. If the function is to add a new record, the IsInsertDisabled attribute for the DataSetTable element must be set to true. If the function is to delete an existing record, the IsDeleteDisabled attribute for the DataSetTable element must be set to true.