601,100
562,"NULL"
586,
585,
564,
565,"hdlITYA=aXVZ0>^Uf9^=h95`T[?@`mW@^D@dP1qeGChysxRHEG^t7rOzUyu44xJl@N209kEc1Lwprgy]sfWi2XKu^Ei>BVa\rTR;[AlP@TDNto7c=\gHQNj1xKdMbbhfxP6f\lY=>;q[i@pyQ32[UQ^I;1cP@6vjuNVyhqFvXOhlwCWf\:;au\xNR\bkOj0^47p]Uz]>"
559,0
593,
594,
595,
597,
598,
596,
800,
801,
566,0
567,","
588,"."
589,
568,""""
570,
571,
569,0
592,0
599,1000
560,4
pAction
pObjectType
pObjectName
pApplication
561,4
2
2
2
2
590,4
pAction,"CREATE"
pObjectType,"Dimension"
pObjectName,""
pApplication,"PM"
637,4
pAction,tion
pObjectType,Object Type (Dimension
pObjectName,Object Name
pApplication,Application (PM
577,0
578,0
579,0
580,0
581,0
582,0
572,137

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****

vFixObjectSecurity = 0;
vApplyRules = 0;
DATASOURCEASCIIQUOTECHARACTER='';
IF (pAction @= 'CREATE');
 
IF (pApplication @= 'PM');
vControlsDim = '}sm_client_properties';
vSupportTaskAttachmentsSetting = 'Support Task Attachments';
vMaximumTaskAttachments = 'Maximum Task Attachments';
vMaximumBlobSize = 'Maximum Blob Size';
IF (DIMENSIONEXISTS(vControlsDim) <> 0);
DIMENSIONELEMENTINSERT(vControlsDim, '', vSupportTaskAttachmentsSetting , 'S');
DIMENSIONELEMENTINSERT(vControlsDim, '', vMaximumTaskAttachments , 'S');
DIMENSIONELEMENTINSERT(vControlsDim, '', vMaximumBlobSize  , 'S');
ENDIF;
ENDIF;
 
######
# create the attachment measures dim and set up the measure elements
######
vAttachMeasuresDim = '}AttachmentMeasures';
vDim = vAttachMeasuresDim;
IF (DIMENSIONEXISTS(vDim) = 0);
DIMENSIONCREATE(vDim);
vFixObjectSecurity = 1;
ENDIF;
vType = 'S';
vConsol = '';
vEle = 'Type';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
vEle = 'Name';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
vEle = 'Path';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
vEle = 'File Type';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
vEle = 'Created By';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
vEle = 'Created Datetime';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
vEle = 'Counts';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
vEle = 'Size';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
vEle = 'Description';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
vType = 'N';
vEle = 'Count';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;

 
######
# create the attachment instances dim and set up the measure elements
######
vAttachmentsDim = '}Attachments';
vDim = vAttachmentsDim;
IF (DIMENSIONEXISTS(vDim) = 0);
DIMENSIONCREATE(vDim);
vFixObjectSecurity = 1;
ENDIF;
vType = 'N';
vConsol = '';
vEle = 'All Attachments';
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
vConsol = vEle;
vMaxAttachments = 10;
vAttachment = 1;
WHILE (vAttachment <= vMaxAttachments);
vEle = 'Attachment' | TRIM(STR(vAttachment, 2, 0));
IF (DIMIX(vDim, vEle) = 0);
DIMENSIONELEMENTINSERT(vDim, '', vEle, vType);
ENDIF;
DIMENSIONELEMENTCOMPONENTADD(vDim, vConsol, vEle, 1);
vAttachment = vAttachment + 1;
END;
IF (pObjectType @<> '' & pObjectName @<> '');
 
######
# create the attachment cube for the requested object
######
IF (pObjectType @= 'Dimension');
IF (DIMENSIONEXISTS(pObjectName) = 0);
PROCESSQUIT;
ENDIF;
vAttachmentObject = '}ElementAttachments_' | pObjectName;
IF (CUBEEXISTS(vAttachmentObject) = 0);
CUBECREATE(vAttachmentObject, pObjectName, vAttachmentsDim, vAttachMeasuresDim );
vFixObjectSecurity = 1;
ENDIF;
ELSEIF (pObjectType @= 'Cube');
 
IF (CUBEEXISTS(pObjectName) = 0);
PROCESSQUIT;
ENDIF;
 
vAttachmentObject = '}CellAttachments_' | pObjectName;
ELSE;
PROCESSQUIT;
ENDIF;
ENDIF;
ENDIF;

# Fix object security in case we created a dimension or cube
IF ( vFixObjectSecurity = 1);
EXECUTEPROCESS('}sm_fix_object_security', 
'pDimensions', 'Y',
'pCubes', 'Y',
'pSetting', 'READ',
'pGroup','',
'pProcesses','N');
ENDIF;
573,3

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****
574,3

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****
575,31

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****

vDim = vAttachmentsDim;
IF (DIMENSIONEXISTS(vDim) <> 0);
vSubset = 'Sorted Attachments';
IF (SUBSETEXISTS(vDim, vSubset) = 0);
SUBSETCREATEBYMDX( vSubset, 
'{TM1SORTBYINDEX( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [' | vDim | '] )}, 0)}, ASC)}');
ENDIF;
ENDIF;
 
IF (pApplication @= 'PM');
IF (DIMENSIONEXISTS(vControlsDim) <> 0);
ATTRPUTS('', vControlsDim,vSupportTaskAttachmentsSetting , 'Client Update');
ATTRPUTS('Y', vControlsDim,vSupportTaskAttachmentsSetting , 'Admin Update');
ATTRPUTS('true', vControlsDim,vSupportTaskAttachmentsSetting , 'Default Value');

ATTRPUTS('', vControlsDim,vMaximumBlobSize  , 'Client Update');
ATTRPUTS('Y', vControlsDim, vMaximumBlobSize , 'Admin Update');
ATTRPUTS('10000', vControlsDim, vMaximumBlobSize , 'Default Value');

ATTRPUTS('', vControlsDim,vMaximumTaskAttachments , 'Client Update');
ATTRPUTS('Y', vControlsDim,vMaximumTaskAttachments , 'Admin Update');
IF (ATTRS(vControlsDim,vMaximumTaskAttachments , 'Default Value') @= '');
ATTRPUTS('10', vControlsDim,vMaximumTaskAttachments , 'Default Value');
ENDIF;

ENDIF;
ENDIF;
576,CubeAction=1511	DataAction=1503	CubeLogChanges=0	
638,1
804,0
900,
901,
902,
903,
906,
907,
908,
904,0
905,0
909,0
910,0
911,
912,
913,
914,
915,
916,
