Table of Contents

Class BudaField

Namespace
PolarStudio
Assembly
PolarStudio.dll

This class contains one field in a dataset.

public class BudaField
Inheritance
BudaField
Inherited Members
Extension Methods

Fields

EditDisabled

This property can be set to True to force disabling editing.

public bool EditDisabled

Field Value

bool

MaxLength

This property gets/sets the maximum length of a text field.

public int MaxLength

Field Value

int

MaxValue

This property gets/sets the maximum value of a numeric field. Use NULL to clear.

public object MaxValue

Field Value

object

MinValue

This property gets/sets the minimum value of a numeric field. Use NULL to clear.

public object MinValue

Field Value

object

Percentage

This property gets/sets if the field is to be shown/interpreted as a percentage.

public bool Percentage

Field Value

bool

ViewDisabled

This property can be set to True to force disabling viewing.

public bool ViewDisabled

Field Value

bool

Properties

AcceptUnicode

Returns True if the underlying field in the database is known to accept unicode characters (like a nvarchar or ntext field)

public bool AcceptUnicode { get; set; }

Property Value

bool

AutoTrim

This property sets the mechanism to automatically remove white space (spaces, tabs, line feeds, line breaks) at the beginning and end of the field.

public bool AutoTrim { get; set; }

Property Value

bool

AutomaticallyAddWildCards

This property sets the behaviour for text fields to automatically add wildcards to the filter terms if the user has not manually added wildcards.

public bool AutomaticallyAddWildCards { get; set; }

Property Value

bool

Blob

Returns a Blob object for this field when this field is a Polar Blob. This blob object can be used to access or manipulate the value of this blob field.

public Blob Blob { get; }

Property Value

Blob

BlobData

This property gets/sets the binary data of a blob field. Use a binary string.

public string BlobData { get; set; }

Property Value

string

BlobDomainSecured

Returns True for memo-type blobs if the data is stored in the application folder. Unsecured blobs store their blob data in the web root.

public bool BlobDomainSecured { get; }

Property Value

bool

BlobStorageFieldType

Returns the type of storage that is used for 'BLOB' fields, (Either 'BLOB' or 'MEMO')

public string BlobStorageFieldType { get; }

Property Value

string

CaptionTC

This property gets/sets the caption of the field.

public string CaptionTC { get; set; }

Property Value

string

Control

Returns the control this field is bound to in case this dataset is part of a form.

public Control Control { get; }

Property Value

Control

DataSet

Returns a reference to the dataset this field is part of.

public BudaDataSet DataSet { get; }

Property Value

BudaDataSet

DateFormatString

Returns the string as is can be used for formatting the value of this field in case of a DateTime field.

public string DateFormatString { get; }

Property Value

string

DateTimeInputType

Returns the type of input for date/time fields (as set in the domain). Use one of: 'DateAndTime', 'DateAndTimeUTC', 'DateOnly', 'TimeOnly'

public string DateTimeInputType { get; }

Property Value

string

DecimalCharacterString

Returns the actual decimal character.

public string DecimalCharacterString { get; }

Property Value

string

Dirty

This method returns True if this field has unsaved changes.

public bool Dirty { get; set; }

Property Value

bool

DisplayValue

This method returns the display value as is to be shown to the user.

public string DisplayValue { get; }

Property Value

string

Domain

Returns the Domain as is applied to this field.

public repDomain Domain { get; }

Property Value

repDomain

DomainDecimalPlaces

Returns the number of decimal places as set in the applied domain.

public int DomainDecimalPlaces { get; }

Property Value

int

DomainHideZeroValues

Returns if the applied domain hides zero values.

public bool DomainHideZeroValues { get; }

Property Value

bool

DomainOptions

Returns the options as defined in the domain of this field.

public repDomainOptions DomainOptions { get; }

Property Value

repDomainOptions

DomainType

Returns the type of domain that is applied to this field. Like 'ValueList', 'FileUpload', 'DateTime'

public string DomainType { get; }

Property Value

string

EditAllowed

Returns True if the user is allowed to edit this. When edit is not allowed, changes can still be made from code.

public bool EditAllowed { get; }

Property Value

bool

EditAllowedScript

This property gets/sets the script expression to determine if editing the value of this field is allowed.

public string EditAllowedScript { get; set; }

Property Value

string

EditBlocked

This property cen be set to True to prevent editing this field. Warning: once set, it cannot be cleared.

public bool EditBlocked { get; }

Property Value

bool

EditPossible

Returns True if edit is possible. If edit is not possible, no changes can be made on this field.

public bool EditPossible { get; }

Property Value

bool

ExplanationTC

This property gets/sets the explanation for this field.

public string ExplanationTC { get; set; }

Property Value

string

FieldDataTypeName

Returns the name of the data type of the underlying field in the database, as 'varchar(32)', 'ntext' or 'datetime'

public string FieldDataTypeName { get; }

Property Value

string

FieldInDataBase

Returns True for fields that are actually in the database (and not the result of an expression).

public bool FieldInDataBase { get; }

Property Value

bool

FieldSize

Returns the max length in characters for 'TEXT' fields.

public int FieldSize { get; }

Property Value

int

FieldType

Returns the FieldType in 'Polar Studio terms', like 'TEXT', 'MEMO', 'BLOB', 'INTEGER', 'NUMBER', 'BOOLEAN', 'DATETIME', 'AUTONUMBER', 'FOREIGNKEY'

public string FieldType { get; }

Property Value

string

FieldValueError

This property gets/sets if this field has an error in its value. This is used to color the fields in the user interface.

public bool FieldValueError { get; set; }

Property Value

bool

FilterAllowed

Returns True if filtering on this field is allowed.

public bool FilterAllowed { get; }

Property Value

bool

FilterBoolean

This property gets/sets the Filter to 'NOT' or ''.

public string FilterBoolean { get; set; }

Property Value

string

FilterValue

This property gets/sets the filter value as is applied to this field.

public string FilterValue { get; set; }

Property Value

string

FullTextIndexed

Returns True if this field is full text indexed in the database.

public bool FullTextIndexed { get; }

Property Value

bool

IdentifierExpression

Returns the SQL expressions that results in the identifier for this foreign key field.

public string IdentifierExpression { get; }

Property Value

string

IdentifierFieldName

Returns the name for foreign key fields that the underlying query uses for the field that returns the identifier for this field.

public string IdentifierFieldName { get; }

Property Value

string

IgnoreChangesByOthers

This property can suppress the check to see if this field has changed in the database.

public bool IgnoreChangesByOthers { get; set; }

Property Value

bool

IsNotNull

Returns True if the value of this field is not NULL

public bool IsNotNull { get; }

Property Value

bool

IsNull

Returns True if the value of this field is NULL

public bool IsNull { get; }

Property Value

bool

LimitForeignKeyOptionsInSearch

This property gets/sets if the list of values shown when searching on a foreign key is limited to the available values found in the current dataset.

public bool LimitForeignKeyOptionsInSearch { get; set; }

Property Value

bool

LocalDateTimeTimeZoneCaption

Returns the caption for the local date/time zone.

public string LocalDateTimeTimeZoneCaption { get; }

Property Value

string

MessagesProfile

Returns the messages profile for the current session.

public string MessagesProfile { get; }

Property Value

string

MinLength

This property gets/sets the minimum length of a text field.

public int MinLength { get; set; }

Property Value

int

Name

Returns the name of the field

public string Name { get; }

Property Value

string

OldValue

Returns the old value in the database.

public object OldValue { get; }

Property Value

object

Pattern

This property gets sets a pattern (a regular expression) that is to be applied when setting a new text value for this field.

public string Pattern { get; set; }

Property Value

string

PolarBlob

Returns True if the blob is saved using the logic of Polar Studio.

public bool PolarBlob { get; }

Property Value

bool

Relationship

Returns the relationship for foreign key fields.

public repRelationship Relationship { get; }

Property Value

repRelationship

Required

This property gets/sets if the field is required. Please note that making a field not-required that is required in the database may cause errors during the update.

public bool Required { get; set; }

Property Value

bool

RightAligned

This property gets/sets if the field is to be aligned to the right.

public bool RightAligned { get; set; }

Property Value

bool

Settings

Returns the settings for this field as set in the repository of Polar Studio.

public repField Settings { get; }

Property Value

repField

SettingsForGroup

Returns the group specific settings for this field for the group of the current user as set in the repository of Polar Studio.

public repFieldSettings SettingsForGroup { get; }

Property Value

repFieldSettings

SysFieldID

Returns the SysFieldID of the field in the Polar Studio repository

public int SysFieldID { get; }

Property Value

int

Tag

The Tag is available for scripted use and can be filled with any text.

public string Tag { get; set; }

Property Value

string

ThousandsCharacterString

Returns the actual thousands character.

public string ThousandsCharacterString { get; }

Property Value

string

ThousandsSeparator

Returns if the applied domain requires a thousands separator.

public bool ThousandsSeparator { get; }

Property Value

bool

Value

This property gets/sets the value of this field. When a new value is set and the given type is a string, this string is assumed to be text-input from the user and is converted to an applicable value if possible.

public object Value { get; set; }

Property Value

object

ViewAllowed

Returns True if the user is allowed to view this field.

public bool ViewAllowed { get; }

Property Value

bool

ViewAllowedScript

This property gets/sets the script expression to determine if viewing the value of this field is allowed.

public string ViewAllowedScript { get; set; }

Property Value

string

WFhistoryField

Returns True if this field is the History field for workflow on this table.

public bool WFhistoryField { get; }

Property Value

bool

WFstateField

Returns True if this field is the State field for workflow on this table.

public bool WFstateField { get; }

Property Value

bool

Methods

BlobFilePath()

Returns the name of the path to used to save the file-system blob.

public string BlobFilePath()

Returns

string

Caption()

This method returns the caption in the current language based on the set caption for this field.

public string Caption()

Returns

string

GetContext()

Returns the context to use for ScriptEvaluate actions.

public Context GetContext()

Returns

Context

The context for this field.

OptionsRecordSet(string, object, bool, int)

Returns a recordset with the options for this field when it is a foreign key.

public Recordset OptionsRecordSet(string pFilter = "", object pRecordID = null, bool pReturnRecordSetForFindForm = false, int pMaxRecordCount = 0)

Parameters

pFilter string

This parameter can be used to find values. It is matched to the identifier for the foreign table.

pRecordID object

This parameter can be filled to only get one specific value (RecordID) to test if that value is a valid value (exists in the list of options) or not.

pReturnRecordSetForFindForm bool

The parameter can be set to true to get values to search for instead of getting values to put in this field in the current record in the dataset.

pMaxRecordCount int

The max number of returned records can be limited with this parameter.

Returns

Recordset

A dynamic recordset with two columns: ID (int/long: the RecordID), Identifier (Varchar)

OptionsRecordSet(string, object, bool, int, ref long, bool)

Returns a recordset with the options for this field when it is a foreign key.

public Recordset OptionsRecordSet(string pFilter, object pRecordID, bool pReturnRecordSetForFindForm, int pMaxRecordCount, ref long pRecordCount, bool pIgnoreAcceptedOption)

Parameters

pFilter string

This parameter can be used to find values. It is matched to the identifier for the foreign table.

pRecordID object

This parameter can be filled to only get one specific value (RecordID) to test if that value is a valid value (exists in the list of options) or not.

pReturnRecordSetForFindForm bool

The parameter can be set to true to get values to search for instead of getting values to put in this field in the current record in the dataset.

pMaxRecordCount int

The max number of returned records can be limited with this parameter.

pRecordCount long

This by ref parameter will be set to the number of found records.

pIgnoreAcceptedOption bool

Normally, when requesting the options to set a value for a field, the current value of the field is always returned as option. This parameter can suppress that forced inclusion.

Returns

Recordset

A dynamic recordset with two columns: ID (int/long: the RecordID), Identifier (Varchar)

SetBlob(string, string, string, string, DateTime)

This method can be used to set or clear the data of a blob field.

public string SetBlob(string pBlobData, string pFileName, string pContentType = "", string pDescription = "", DateTime pUploadDateTime = default)

Parameters

pBlobData string

The binary data (as binary string) for the blob. Use an empty string to clear the blob.

pFileName string

The base file name for the blob. Use an empty string to clear the blob.

pContentType string

A content type for the blob. If not given, it will be determined based on the file extension of the given file name.

pDescription string

The description for the blob.

pUploadDateTime DateTime

An upload date/time. If not given, UTCnow is used.

Returns

string

An error message is applicable.

Exceptions

PolarException

If SetBlob is used on a non-blob field, an exception is thrown.

SetValue(object, bool)

This method can be used to set a value and to suppress throwing errors. If an error occurs when setting the value, an error message is returned.

public string SetValue(object pNewValue, bool pThrowErrors = false)

Parameters

pNewValue object

The new value to apply.

pThrowErrors bool

A boolean indicating that errors should be thrown instead of returned as message.

Returns

string

A string with an error message or an empty string if no error occurred.

Exceptions

PolarException

If pThrowErrors is passes as True and an error occurs, then this error is thrown.

SetValue_Forced(object)

This method sets the value of this field without any checking etc. Can for example be used to push a value of a foreign key that is not allowed due to permissions or constraints but has to be set anyway.

public void SetValue_Forced(object pNewValue)

Parameters

pNewValue object

Value_LocalDateTime(bool, object)

This method is a setting meant for DateTimeUTC fields. When setting this value, the conversion from local time to UTC time is only done if a Date-type is given.

public void Value_LocalDateTime(bool pTwilightZoneDST, object pNewValue)

Parameters

pTwilightZoneDST bool

This boolean indicates if the given local DateTime value is to be interpreted as the twilight zone.

pNewValue object

Value_LocalDateTime(ref bool, ref string)

This method is a getter meant for DateAndTimeUTC fields, to retrieve the DateTime value as local date.

public object Value_LocalDateTime(ref bool pTwilightZoneDST, ref string pTimeZoneName)

Parameters

pTwilightZoneDST bool

This by ref boolean will be set to True when the UTC datetime is in the 'twilight zone'

pTimeZoneName string

The by ref string will be set to the name of the timezone for the local date/time.

Returns

object

The local date time