Class ImporterFormulaContext
The context used for evaluating formulas against OverrideValueFormula
Inheritance
Inherited Members
Namespace: LemonEdge.API.Core.Processors.Importing
Assembly: LemonEdge.API.dll
Syntax
public class ImporterFormulaContext : FormulaFunctionsWithUpdater, IFormulaImporterContext, IFormulaFunctions
Properties
IsLastRow
Indicates this item being evaluated is the last row of the dataset being imported
Declaration
public bool IsLastRow { get; set; }
Property Value
Type | Description |
---|---|
bool |
Item
The item being created/updated and imported
Declaration
public IBaseEntity Item { get; }
Property Value
Type | Description |
---|---|
IBaseEntity |
MyRawValue
The raw value of the import source data for this column
Declaration
public string MyRawValue { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
GetValueFromColumnIndex(short)
Returns the raw string data from the import file for the mapping property that matches on Sequence
Declaration
[FormulaFunction(Name = "GetValueFromColumnIndex", Type = "Context", Description = "Returns the raw string data from the import file for the mapping property that matches on Sequence. The column order.", Params = "1. The column sequence of the data mapping property you want to return the value of", ParamCount = 1)]
public string GetValueFromColumnIndex(short colIndex)
Parameters
Type | Name | Description |
---|---|---|
short | colIndex |
Returns
Type | Description |
---|---|
string | The raw string data from the import file for the mapping property that matches on Sequence |
GetValueFromHeaderName(string)
Returns the raw string data from the import file for the mapping property that matches on ColumnHeaderName
Declaration
[FormulaFunction(Name = "GetValueFromHeaderName", Type = "Context", Description = "Returns the raw string data from the import file for the mapping property that matches on ColumnHeaderName", Params = "1. The column header name of the data mapping property you want to return the value of", ParamCount = 1)]
public string GetValueFromHeaderName(string headerName)
Parameters
Type | Name | Description |
---|---|---|
string | headerName |
Returns
Type | Description |
---|---|
string | The raw string data from the import file for the mapping property that matches on ColumnHeaderName |
GetValueFromMappedProperty(string)
Returns the raw string data from the import file for the mapping property that matches on PropertyName
Declaration
[FormulaFunction(Name = "GetValueFromMappedProperty", Type = "Context", Description = "Returns the raw string data from the import file for the mapping property that matches on PropertyName", Params = "1. The propertyname of the data mapping property you want to return the value of", ParamCount = 1)]
public string GetValueFromMappedProperty(string header)
Parameters
Type | Name | Description |
---|---|---|
string | header | The property name of the mapping property to retrieve the value from that matches on PropertyName |
Returns
Type | Description |
---|---|
string | The raw string data from the import file for the mapping property that matches on PropertyName |
ItemAs<T>()
The imported item cast as the type of entity it should be
Declaration
public T ItemAs<T>() where T : IBaseEntity
Returns
Type | Description |
---|---|
T | The imported item cast as the type of entity it should be |
Type Parameters
Name | Description |
---|---|
T | The type of entity that should be being imported |
SetData(MappedData)
Declaration
public void SetData(CSVImporter.MappedData data)
Parameters
Type | Name | Description |
---|---|---|
CSVImporter.MappedData | data |