ActiveScriptingBaseGetCorrectField Method Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Extracts the correct value from a passed in EPT field name and a static field value.

Namespace: ContentStudio.Site.ActiveScripting
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

protected string GetCorrectField(
	string eptFieldName,
	string staticText
)

Parameters

eptFieldName
Type: SystemString
The name of an EPT field. This parameter can be empty or null (Nothing in Visual Basic) if StaticText is specified.
staticText
Type: SystemString
The string to return. If this parameter is null (Nothing in Visual Basic) or an empty string, the EPTFieldName is evaluated and returned if existing.

Return Value

Type: String
Returns the StaticText argument unless the EPTFieldName argument specifies a valid EPT field in the document, in that case the value of the field is returned. If StaticText is null (Nothing in Visual Basic) or an empty string and the EPT field does not exist, null (Nothing in Visual Basic) is returned.
Remarks

This method can return null (Nothing in Visual Basic), thus callers must handle this case accordingly. Many Content Studio components that has the ability to use either a constant text or the value of an EPT field uses this method to return the relevant data.
See Also

Reference