Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

FullCustomColumnSettings class: Difference between revisions

From Catglobe Wiki
No edit summary
No edit summary
 
Line 18: Line 18:
array result = {};
array result = {};
for(i for 0; fs.UpdatedNumberOfRows) {
for(i for 0; fs.UpdatedNumberOfRows) {
     if (CreatedDate[i] == empty)
     if (CreatedDate[i] == empty){
        result.Add(empty);
result.Add(empty);
    result.Add(CreatedDate[i][DateTime_Year]*10000 + CreatedDate[i][DateTime_Month]*100 + CreatedDate[i][DateTime_Day]);
}
else{
result.Add(CreatedDate[i][DateTime_Year]*10000 + CreatedDate[i][DateTime_Month]*100 + CreatedDate[i][DateTime_Day]);
}
}
return result;
return result;

Latest revision as of 07:34, 18 March 2024

FullCustomColumnSettings



Settings that affect the rebuild of a full column custom column.

Parent class

Inherits from object

Methods

  • (From object) string ToString() - The string representation of the object.

Properties

  • string ObjectTypeName { get; } - The name of the type of object.
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.
  • int UpdatedNumberOfRows { get; } - Amount of rows needed to return.
  • bool WorkOnFullColumnDuringPartialRebuild { get; set; } - If false(default) then during rebuild when accessing another column then only the new rows are returned. Otherwise return the full dataset. Only has effect if set before first reference to column and before returning final result.

Examples

Example for make a "Date" custom column (full column) base on "CreateDate"

array param = Workflow_getParameters();
//Dictionary localCache = param[0];
FullCustomColumnSettings fs = param[1];
array result = {};
for(i for 0; fs.UpdatedNumberOfRows) {
    if (CreatedDate[i] == empty){
		result.Add(empty);
	}
	else{
		result.Add(CreatedDate[i][DateTime_Year]*10000 + CreatedDate[i][DateTime_Month]*100 + CreatedDate[i][DateTime_Day]);
	}   
}
return result;

Example for using local cache on custom columns

//Script on Main column
array param = Workflow_getParameters();//preserved between customcols
Dictionary localCache = param[0];
array aMonth;
array aYear;
array result;
for(i for 0; Id.Count) {
	aMonth.Add(12);
	aYear.Add(2050);
	result.Add(i);
}
localCache["month"]= aMonth;
localCache["year"]= aYear;
return result;

//On slave column "Year" and "Month" just make a return from "mainCol"
return mainCol["month"];
return mainCol["year"];

And data result on column main and 2 slave columns Month and Year: