Difference between revisions of "FullCustomColumnSettings class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=<nowiki>FullCustomColumnSettings</nowiki> |Description=<nowiki>Settings that affect the rebuild of a full column custom column.</nowiki> |Method...")
 
Line 10: Line 10:
 
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>WorkOnFullColumnDuringPartialRebuild</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>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.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>WorkOnFullColumnDuringPartialRebuild</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>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.</nowiki>}}
 
}}
 
}}
 +
=== <span style="color:#DF8621">'''Examples'''</span> ===
 +
<source lang="javascript">
 +
//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 = {};
 +
number cnt = fs.UpdatedNumberOfRows;
 +
for(number i = 0; i < cnt; i++) {
 +
    if (CreatedDate[i] == empty)
 +
        result.Add(empty);
 +
    result.Add(CreatedDate[i][DateTime_Year]*10000 + CreatedDate[i][DateTime_Month]*100 + CreatedDate[i][DateTime_Day]);
 +
}
 +
return result;
 +
</source>

Revision as of 09:36, 16 March 2018

FullCustomColumnSettings



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


Methods

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

Properties

  • string ObjectTypeName { get; } - The name of the type of 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 = {};
number cnt = fs.UpdatedNumberOfRows;
for(number i = 0; i < cnt; i++) {
    if (CreatedDate[i] == empty)
        result.Add(empty);
    result.Add(CreatedDate[i][DateTime_Year]*10000 + CreatedDate[i][DateTime_Month]*100 + CreatedDate[i][DateTime_Day]);
}
return result;