TM1 Coding Standards
Posted: Wed Jan 15, 2025 9:45 pm
Hi
I just want to get an opinion from the more experienced TM1 developers/coders....i am doing some remote work for a Dubai based construction company from Australia. I have this consultant from an Indian IT firm telling me to change my coding standard to follow the organisation standard. No information provided. I find it extremely hard to understand and accept that this is the CODING STANDARD !! Reluctantly, I have changed it...i just want to get an opinion on what you would have done in my place. I do not have access to the so-called Coding Standard official or otherwise.
Here are examples of my codes and what i am told to modify to... what would you do in my place ? I am told to create unnecessary spaces etc
Replaced some codes with 'xxx' for privacy reason.
I just want to get an opinion from the more experienced TM1 developers/coders....i am doing some remote work for a Dubai based construction company from Australia. I have this consultant from an Indian IT firm telling me to change my coding standard to follow the organisation standard. No information provided. I find it extremely hard to understand and accept that this is the CODING STANDARD !! Reluctantly, I have changed it...i just want to get an opinion on what you would have done in my place. I do not have access to the so-called Coding Standard official or otherwise.
Here are examples of my codes and what i am told to modify to... what would you do in my place ? I am told to create unnecessary spaces etc
Replaced some codes with 'xxx' for privacy reason.
Code: Select all
----------------------------------------------My Code (spaces in dots)
dm = 'RFI XML ID Temp';
IF(Dimix(dm,v_RFI_IdNum) = 0);
...DimensionElementInsert(dm,'',v_RFI_IdNum,'S');
ENDIF;
sDim = 'RFI XML ID';
IF ( DIMIX( sDim, v_RFI_IdNum ) = 0);
...DimensionElementInsert(sDim,'',v_RFI_IdNum,'S');
ENDIF;
----------------------------------------------------Modified To
sDim = 'AU Sample RFI';
IF ( DIMIX( sDim, v_RFI_IdNum ) = 0);
DimensionElementInsert(sDim,'',v_RFI_IdNum,'S');
ENDIF;
sDim = 'RFI XML ID';
IF ( DIMIX( sDim, v_RFI_IdNum ) = 0);
DimensionElementInsert(sDim,'',v_RFI_IdNum,'S');
ENDIF;
----------------------------------------------My Code (spaces shown as dot)
sJuris_Sub = 'CP_Sample_Jurisdiction';
IF( SubsetElementExists( sJurisdiction | ' Reportable Jurisdiction', sJuris_Sub, v_Reportable_Jurisdiction ) =0 );
...SubsetElementInsert( sJurisdiction| ' Reportable Jurisdiction', sJuris_Sub, v_Reportable_Jurisdiction,1 );
ENDIF;
----------------------------------------------- Modified Ton (unnecessary spaces)
sJuris_Sub = 'CP_Sample_Jurisdiction';
..spaces.. IF( SubsetElementExists( sJurisdiction | ' Reportable Jurisdiction', sJuris_Sub, v_Reportable_Jurisdiction ) =0 );
..spaces..... SubsetElementInsert( sJurisdiction| ' Reportable Jurisdiction', sJuris_Sub, v_Reportable_Jurisdiction,1 );
--spaces...ENDIF;
#-------------------------------------
----------------------------------------------My Code (spaces shown as dots)
vdm= sDim_Temp;
IF(DimensionExists(vdm)=1);
...DimensionDestroy(vdm);
endif;
vdm = sDim_Temp1;
IF(DimensionExists(vdm)=1);
...DimensionDestroy(vdm);
endif;
vdm = sDim_Temp2 ;
IF(DimensionExists(vdm)=1);
...DimensionDestroy(vdm);
endif;
vdm = sDim_Temp4;
IF(DimensionExists(vdm)=1);
...DimensionDestroy(vdm);
endif;
-----------------------Modified To (unnecessary spaces shown with dots)
sDim_Temp= sDim_Temp;
....IF(DimensionExists(sDim_Temp)=1);
.......DimensionDestroy(sDim_Temp);
....ENDIF;
sDim_Temp = sDim_Temp1;
....IF(DimensionExists(sDim_Temp)=1);
.......DimensionDestroy(sDim_Temp);
....ENDIF;
sDim_Temp = sDim_Temp2 ;
....IF(DimensionExists(sDim_Temp)=1);
.......DimensionDestroy(sDim_Temp);
....ENDIF;
sDim_Temp = sDim_Temp3;
....IF(DimensionExists(sDim_Temp)=1);
.......DimensionDestroy(sDim_Temp);
....ENDIF;