Difference between revisions of "FolderResourceTemplate class"
Line 1: | Line 1: | ||
{{CGscriptClass_Template | {{CGscriptClass_Template | ||
− | |Name=<nowiki> | + | |Name=<nowiki>FullCustomColumnSettings</nowiki> |
− | |Description=<nowiki> | + | |Description=<nowiki>Settings that affect the rebuild of a full column custom column.</nowiki> |
− | |InheritsFrom= | + | |InheritsFrom=object|Methods= |
− | |||
− | |||
− | |||
− | |Methods= | ||
− | |||
− | |||
− | |||
− | |||
− | |||
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}} | ||
|Properties= | |Properties= | ||
− | |||
− | |||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}} | ||
+ | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>UpdatedNumberOfRows</nowiki>|HasGetter=1|Description=<nowiki>Amount of rows needed to return.</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>}} | ||
}} | }} | ||
Revision as of 07:47, 2 July 2020
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 creating a new FolderResourceTemplate
FolderResourceTemplate folderRT = new FolderResourceTemplate("folderRT name");
folderRT.LocalizedNames={"da-DK":" name in DK", "en-US":" name in US"};
folderRT.DefaultLanguage("da-DK");
folderRT.Save();
//Example for working with an existing FolderResourceTemplate
number folderResourceTemplateRId = 15547989;
ResourceTemplateHelper rth = new ResourceTemplateHelper ();
FolderResourceTemplate folderRT = rth.GetTemplate(folderResourceTemplateRId);
folderRT.ResourceTimeregEnabled=false;
folderRT.Save();
print(folderRT.ResourceName);//folderRT name
print(folderRT.ResourceId);//15547989
//Example for creating new properties
number folderResourceTemplateRId = 15547989;
ResourceTemplateHelper rth = new ResourceTemplateHelper ();
FolderResourceTemplate folderRT = rth.GetTemplate(folderResourceTemplateRId);
new ResourceTemplatePropertyNumber ("propertyNameTypeNumber",false,"description",folderRT);
new ResourceTemplatePropertyBoolean ("propertyNameTypeBoolean",true,"description",folderRT);
new ResourceTemplatePropertyString ("propertyNameTypeString",false,"description",folderRT);
new ResourceTemplatePropertyDateTime ("propertyNameTypeDateTime",false,"description",folderRT);
new ResourceTemplatePropertySingle ("propertyNameTypeSingle",true,"description",folderRT);
new ResourceTemplatePropertyMulti ("propertyNameTypeMulti",false,"description",folderRT);
ResourceTemplatePropertyResource propertyResource = new ResourceTemplatePropertyResource ("propertyNameTypeResource", false, "", folderRT);
propertyResource.AddAllowedResourceType(Resource_Type_Folder,{2071,15504791});
folderRT.SaveProperties();
//Example for working with existing properies
number folderResourceTemplateRId = 15547989;
ResourceTemplateHelper rth = new ResourceTemplateHelper ();
FolderResourceTemplate folderRT = rth.GetTemplate(folderResourceTemplateRId);
array arrayProperty = folderRT.Properties;
ResourceTemplatePropertyNumber propertyNumber = arrayProperty[0];
propertyNumber.IsDecimal=true;
ResourceTemplatePropertyString propertyString = folderRT.Properties.First(function (object p){return p.Label=="propertyNameTypeString";});
propertyString.Required =true;
ResourceTemplatePropertyResource propertyResource = folderRT.Properties.First(function (object p){return p.Label=="propertyNameTypeResource";});
propertyResource.RemoveAllowedResourceType(Resource_Type_Folder);
propertyResource.AddAllowedResourceType(Resource_Type_Report);
folderRT.SaveProperties();