Overview

Custom properties are local variables created for a specific Display. They can be accessed in CodeBehind and in the Display itself.

Custom properties can also be linked to Tags, by setting the Property Name as ”@Tag.<TagName>”, where <TagName> is a valid name in Edit > Tags > Objects.

The properties added to your display are created as an array format. They are accessed through an index. The index ordination depends on the order the properties were created.

E.g.:

@Display.<PageName>.CustomProperties[index];

This property can be used as an alternative to using tags in any logic.

An advantage is the possibility of decreasing the total communication points while maintaining the same project functionalities. This can be very useful depending on your license type.

On the other hand, the logic programmed with the CustomProperties are only valid for a specific Display. Meaning you can not retain the data from one Page for use in another.



Methods Available in Runtime

GetCustomPropertiesAsString(string sep)

string msg = @Display.About.GetCustomPropertiesAsString(",");


GetCustomPropertyValue(string PropertyName,string defaultValue):

string  propValue  =  @Display.MainPage.GetCustomPropertyValue("p1","-1").ToString();


SetCustomProperties(string str, string sep)

@Display.MainPage.SetCustomProperties("p1=10;p2=20",  ";");


SetCustomPropertyValue(string propertyName, object propertyValue)

@Display.MainPage.SetCustomPropertyValue("@Tag.Integer1",  50");


RemoveAllCustomProperties():

@Display.LogOn.RemoveAllCustomProperties();


If a Tag’s Custom Property is removed, the Tag will retain the old property as its current value.