Trigger on alias

Hi,
are the triggers on alias files working? I have defined AfterInsert/Update/Delete triggers in dct in both original file and alias, but the ABC code is generated just for original file. Please look below, FhdAHead is the alias.
Thanks

Hide:Access:FhdAHead CLASS(FileManager),TYPE               ! FileManager for FhdAHead
Init                   PROCEDURE(),DERIVED
Kill                   PROCEDURE(),DERIVED
UseFile                PROCEDURE(BYTE UseType = UseType:Uses),BYTE,PROC,DERIVED
                     END

Hide:Access:FhdHead  CLASS(FileManager),TYPE               ! FileManager for FhdHead
Init                   PROCEDURE(),DERIVED
Kill                   PROCEDURE(),DERIVED
PostDelete             PROCEDURE(*CSTRING ErrCode,*CSTRING ErrMsg),BYTE,DERIVED
PostInsert             PROCEDURE(*CSTRING ErrCode,*CSTRING ErrMsg),BYTE,DERIVED
PostUpdate             PROCEDURE(*CSTRING ErrCode,*CSTRING ErrMsg),BYTE,DERIVED
UseFile                PROCEDURE(BYTE UseType = UseType:Uses),BYTE,PROC,DERIVED
                     END

I see in the template
#AT(%FileManagerDataSection, , 'PostInsert', '(*CSTRING ErrCode,*CSTRING ErrMsg),BYTE'),WHERE(~%AliasFile),PRIORITY(5000),DESCRIPTION('DCT Data') #INSERT(%TriggerGenerateData,'AFTER_INSERT') #ENDAT
so it is not for Alias files, but why?
I do not see the logic

@lodestar went through this and posted a solution on the newsgroups.

1 Like

I’ve attached the template I wrote to add trigger support to alias files. It’s a bit rough around the edges and I planned on adding more to it but, hey, it’s free! :slightly_smiling_face:AliasTriggerSupport.zip (1.4 KB)

1 Like

Free is nice :slight_smile:
I really do not understand the logic why this is not out of the box.
Anyway
Thanks