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
MaxLength
This property gets/sets the maximum length of a text field.
public int MaxLength
Field Value
MaxValue
This property gets/sets the maximum value of a numeric field. Use NULL to clear.
public object MaxValue
Field Value
MinValue
This property gets/sets the minimum value of a numeric field. Use NULL to clear.
public object MinValue
Field Value
Percentage
This property gets/sets if the field is to be shown/interpreted as a percentage.
public bool Percentage
Field Value
ViewDisabled
This property can be set to True to force disabling viewing.
public bool ViewDisabled
Field Value
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
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
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
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
BlobData
This property gets/sets the binary data of a blob field. Use a binary string.
public string BlobData { get; set; }
Property Value
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
BlobStorageFieldType
Returns the type of storage that is used for 'BLOB' fields, (Either 'BLOB' or 'MEMO')
public string BlobStorageFieldType { get; }
Property Value
CaptionTC
This property gets/sets the caption of the field.
public string CaptionTC { get; set; }
Property Value
Control
Returns the control this field is bound to in case this dataset is part of a form.
public Control Control { get; }
Property Value
DataSet
Returns a reference to the dataset this field is part of.
public BudaDataSet DataSet { get; }
Property Value
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
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
DecimalCharacterString
Returns the actual decimal character.
public string DecimalCharacterString { get; }
Property Value
Dirty
This method returns True if this field has unsaved changes.
public bool Dirty { get; set; }
Property Value
DisplayValue
This method returns the display value as is to be shown to the user.
public string DisplayValue { get; }
Property Value
Domain
Returns the Domain as is applied to this field.
public repDomain Domain { get; }
Property Value
DomainDecimalPlaces
Returns the number of decimal places as set in the applied domain.
public int DomainDecimalPlaces { get; }
Property Value
DomainHideZeroValues
Returns if the applied domain hides zero values.
public bool DomainHideZeroValues { get; }
Property Value
DomainOptions
Returns the options as defined in the domain of this field.
public repDomainOptions DomainOptions { get; }
Property Value
DomainType
Returns the type of domain that is applied to this field. Like 'ValueList', 'FileUpload', 'DateTime'
public string DomainType { get; }
Property Value
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
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
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
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
ExplanationTC
This property gets/sets the explanation for this field.
public string ExplanationTC { get; set; }
Property Value
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
FieldInDataBase
Returns True for fields that are actually in the database (and not the result of an expression).
public bool FieldInDataBase { get; }
Property Value
FieldSize
Returns the max length in characters for 'TEXT' fields.
public int FieldSize { get; }
Property Value
FieldType
Returns the FieldType in 'Polar Studio terms', like 'TEXT', 'MEMO', 'BLOB', 'INTEGER', 'NUMBER', 'BOOLEAN', 'DATETIME', 'AUTONUMBER', 'FOREIGNKEY'
public string FieldType { get; }
Property Value
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
FilterAllowed
Returns True if filtering on this field is allowed.
public bool FilterAllowed { get; }
Property Value
FilterBoolean
This property gets/sets the Filter to 'NOT' or ''.
public string FilterBoolean { get; set; }
Property Value
FilterValue
This property gets/sets the filter value as is applied to this field.
public string FilterValue { get; set; }
Property Value
FullTextIndexed
Returns True if this field is full text indexed in the database.
public bool FullTextIndexed { get; }
Property Value
IdentifierExpression
Returns the SQL expressions that results in the identifier for this foreign key field.
public string IdentifierExpression { get; }
Property Value
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
IgnoreChangesByOthers
This property can suppress the check to see if this field has changed in the database.
public bool IgnoreChangesByOthers { get; set; }
Property Value
IsNotNull
Returns True if the value of this field is not NULL
public bool IsNotNull { get; }
Property Value
IsNull
Returns True if the value of this field is NULL
public bool IsNull { get; }
Property Value
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
LocalDateTimeTimeZoneCaption
Returns the caption for the local date/time zone.
public string LocalDateTimeTimeZoneCaption { get; }
Property Value
MessagesProfile
Returns the messages profile for the current session.
public string MessagesProfile { get; }
Property Value
MinLength
This property gets/sets the minimum length of a text field.
public int MinLength { get; set; }
Property Value
Name
Returns the name of the field
public string Name { get; }
Property Value
OldValue
Returns the old value in the database.
public object OldValue { get; }
Property Value
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
PolarBlob
Returns True if the blob is saved using the logic of Polar Studio.
public bool PolarBlob { get; }
Property Value
Relationship
Returns the relationship for foreign key fields.
public repRelationship Relationship { get; }
Property Value
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
RightAligned
This property gets/sets if the field is to be aligned to the right.
public bool RightAligned { get; set; }
Property Value
Settings
Returns the settings for this field as set in the repository of Polar Studio.
public repField Settings { get; }
Property Value
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
SysFieldID
Returns the SysFieldID of the field in the Polar Studio repository
public int SysFieldID { get; }
Property Value
Tag
The Tag is available for scripted use and can be filled with any text.
public string Tag { get; set; }
Property Value
ThousandsCharacterString
Returns the actual thousands character.
public string ThousandsCharacterString { get; }
Property Value
ThousandsSeparator
Returns if the applied domain requires a thousands separator.
public bool ThousandsSeparator { get; }
Property Value
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
ViewAllowed
Returns True if the user is allowed to view this field.
public bool ViewAllowed { get; }
Property Value
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
WFhistoryField
Returns True if this field is the History field for workflow on this table.
public bool WFhistoryField { get; }
Property Value
WFstateField
Returns True if this field is the State field for workflow on this table.
public bool WFstateField { get; }
Property Value
Methods
BlobFilePath()
Returns the name of the path to used to save the file-system blob.
public string BlobFilePath()
Returns
Caption()
This method returns the caption in the current language based on the set caption for this field.
public string Caption()
Returns
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
stringThis parameter can be used to find values. It is matched to the identifier for the foreign table.
pRecordID
objectThis 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
boolThe 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
intThe 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
stringThis parameter can be used to find values. It is matched to the identifier for the foreign table.
pRecordID
objectThis 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
boolThe 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
intThe max number of returned records can be limited with this parameter.
pRecordCount
longThis by ref parameter will be set to the number of found records.
pIgnoreAcceptedOption
boolNormally, 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
stringThe binary data (as binary string) for the blob. Use an empty string to clear the blob.
pFileName
stringThe base file name for the blob. Use an empty string to clear the blob.
pContentType
stringA content type for the blob. If not given, it will be determined based on the file extension of the given file name.
pDescription
stringThe description for the blob.
pUploadDateTime
DateTimeAn 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
objectThe new value to apply.
pThrowErrors
boolA 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
boolThis 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
boolThis by ref boolean will be set to True when the UTC datetime is in the 'twilight zone'
pTimeZoneName
stringThe by ref string will be set to the name of the timezone for the local date/time.
Returns
- object
The local date time