If you want to use dynamically created folders, you'll need the "TC_HookService_MoveToNewFolder".
Open PARTadmin and filter by "MoveToNewFolder".
Enable the "Additional Task" and set the desired values for "TC_HookService_MoveToNewFolder_DESTINATION_FOLDER" and "TC_HookService_MoveToNewFolder_Flags".
[CreationOptions] PdmOnCheckin_04.EXECUTE=_TC_HOOK_SERVICE.moveToNewFolder TC_HookService_MoveToNewFolder_DESTINATION_FOLDER=?"Home/DaBe/"+_Format_0
("<PREFIXLIST(/)>").value() + "/" + _FORMAT_0("<ATTR(NN)>").value()
TC_HookService_MoveToNewFolder_Flags=13 TC_HookService_MoveToNewFolder_Flags is specified as <bitfield>. 13 = 1+4+8
#:HELP; The parameter <Bitfield> for moveToNewFolder: # 1: create not existing folders? # 2: use Item owner as source folder user? # (TC_HookService_MoveToNewFolder_SourceFol der_User will be ignored) # 4: use Item owner as destination folder user? # (TC_HookService_MoveToNewFolder_DestinationFolder_User will be ignored) # 8: get sorce folder(s) from Item? # (TC_HookService_MoveToNewFolder_SOURCE_FOLDER will be ignored)
-> The item is moved to the configured folder.
When attempting to move a document using TC_HOOK_SERVICE.moveToNewFolder, an error message appears.[62]
Cause: It is a Workflow issue.
IfProeTeamcentersaves the item initially in the folder specified in the configuration key TC_TmpFolder; by default is the Newstuff folder of the current user. There is the item at that time.The TC_TargetFolder key is applied in EndCheckinTransaction (the item is moved), specifically after Checkin1 (PdmOnCheckin_XX). In this case, with the MoveToNewFolder hook service active, an attempt is made in PdmOnCheckin_01 to move the part from TC_HOOKSERVICE_MOVETONEWFOLDER_SOURCE_FOLDER=Home/QA/GOHR/CREO to TC_HOOKSERVICE_MOVETONEWFOLDER_DESTINATION_FOLDER=Home/QA/3Dfindit. This cannot work because the item is still located in the TC_TmpFolder (in this case, Newstuff).
Usually, MoveToNewFolder is not required because
IfProeTeamcenterthe files to EndCheckinTransaction.However, if you want to move the parts to a folder that does not belong to the current user, or if there is another valid reason not to use the built-in move function, enter the value of TC_TmpFolder in the key TC_HOOKSERVICE_MOVETONEWFOLDER_SOURCE_FOLDER and do not set TC_TargetFolder.


