Table of Contents

Class ElementField

Namespace
JJMasterData.Commons.Data.Entity.Models
Assembly
JJMasterData.Commons.dll

Representation of a metadata field.

public class ElementField
Inheritance
ElementField
Derived
Inherited Members

Remarks

2017-03-22 - JJTeam

Properties

AutoNum

Auto Numerical (Identity) (Default=false)

[JsonProperty("autonum")]
[Display(Name = "Identity")]
public bool AutoNum { get; set; }

Property Value

bool

DataBehavior

Field behavior in relation to the database Default value: Real

[JsonProperty("databehavior")]
[Display(Name = "Behavior")]
public FieldBehavior DataBehavior { get; set; }

Property Value

FieldBehavior

Remarks

Real = Used in both Get and Set operations

ViewOnly = Used to only in theGet operation

WriteOnly = Used to only in the Set operation

Virtual = Ignored in database operations

DataType

Data Type Default NVARCHAR

[JsonProperty("datatype")]
[Display(Name = "Data Type")]
public FieldType DataType { get; set; }

Property Value

FieldType

DefaultValue

Default field initializer

Expression for a default value

Tipo [val:] returns a value;

Tipo [exp:] returns the result of the expression;

Tipo [sql:] returns the result of a sql command;

Tipo [protheus:] returns the result of a Protheus function;
[JsonProperty("defaultvalue")]
[Display(Name = "Default Value Expression")]
public string? DefaultValue { get; set; }

Property Value

string

Remarks

EnableOnDelete

Apply this field on delete filter on procedure

[JsonIgnore]
public bool EnableOnDelete { get; set; }

Property Value

bool

FieldId

Internal field id

[JsonProperty("fieldid")]
public int FieldId { get; set; }

Property Value

int

Filter

Filter Parameters

[JsonProperty("filter")]
public ElementFilter Filter { get; set; }

Property Value

ElementFilter

IsPk

Primary Key (Default=false)

[JsonProperty("ispk")]
[Display(Name = "Primary Key")]
public bool IsPk { get; set; }

Property Value

bool

IsRequired

Required field (Default=false)

[JsonProperty("isrequired")]
[Display(Name = "Required")]
public bool IsRequired { get; set; }

Property Value

bool

Label

Description on the form

[JsonProperty("label")]
[Display(Name = "Label")]
public string? Label { get; set; }

Property Value

string

LabelOrName

[JsonIgnore]
public string LabelOrName { get; }

Property Value

string

Name

Column name

[JsonProperty("fieldname")]
[Display(Name = "Name")]
public string Name { get; set; }

Property Value

string

Remarks

When in JJGridView, the "::ASC" OR "::DESC" tags can be used in the column name to indicate the data order.

Size

Filed Size

[JsonProperty("size")]
[Display(Name = "Size")]
public int Size { get; set; }

Property Value

int

Methods

DeepCopy()

public ElementField DeepCopy()

Returns

ElementField