"After Script"

I noticed that there is a tab in the modeler for tables called “before script” and “after script”

Perhaps this is how I can insert some predefined records right after a table is created?

I can’t find anywhere in the help files what those tabs are for. What are they for?

Hi,
Before Script Tab - Whatever you write into the Before Script section, it will be generated before the Entity definition.
After Script Tab - Whatever you write into the After Script section, it will be generated after the Entity definition.

Regards,
Vladka

Ok, I tried using it and examining the generated script. There was a problem though with the order of things. The table gets created, then my after script was inserted, and towards the end of the script the triggers were created. The after script needs to be executed after the triggers and not before.

I thought maybe the the “order” option in the generate dialog would assist me, but there was no option to change things the way I needed.

I just wrote another script and keep it seperate from the one TDM generates, which works for now. I should probably keep the insertion of data seperate from ddl anyway.

Message was edited by: cpisz_515

Hi,

The after script needs to be executed after the triggers and not before.

In this case, you can use the After Script section in Model Properties (Model menu).
After Script of tables will be always generated right after tables.

OR

You can use our user package "Extra Objects - DDL Script Generation" where you can define an Extra Object and SQL code that you want to generate. Then you can set where you want to generate the Extra Object - via the option Order of Generated Objects (Model menu).

The user package is available at:
http://modeling.inside.quest.com/entry.jspa?externalID=3213&categoryID=34

Regards,

Vladka + Mario