Toad World® Forums

Custom Substitution Variable for Entities

TDM 4.1.5.8

When I create an entity, I’d like to be able to specify a “short name”, say 10 characters, and reference it in Settings : Default Values or in templates.

For example, I would like to be able to edit Settings : Default Values : Relationships and set the values of Name and Caption to something like “<%ChildTableShortName%>$<%ParentTableShortName%>$fk”.

Any suggestions?

Thank You!
-Tom

Hi,

see the following movie:
http://modeling.inside.quest.com/entry.jspa?categoryID=158&externalID=4901

Custom package is enclosed. Feel free to modify it :wink:

Regards,

Vaclav & TDM team
RelationName.zip (2.46 KB)

Wow, I’ll need to work through your video, but I believe it is exactly what I am looking for.

Absolutely outstanding support; thank you very much!

-Tom

Thank you for your praise :slight_smile:

Vaclav & TDM team

All was going wonderfully until I got to the step where I select an entity, go to the general tab, right click and select “Customize Form as…”.

The “Customize Form as…” option is visible but not enabled; can you tell me how to enable it?

Thanks!
-Tom

I tracked down the solution (Settings -> Options -> Expert Mode -> Clear "Save the definitions to 'My Package'" checkbox) and was able to see and select the "Customize form as..." option in the context menu.

Unfortunately, when I select that option it thinks for a seconds and then pops up an access violation. If you continue on without restarting the application you see the Package List, but the RenameRelation package is not shown.

Screen captures of the package list dialog, error report general info tab, and call stack tab are attached as images.

Any ideas?

Thanks!
-Tom

Addendum: This morning I tried this process on my old laptop running 32-bit XP Pro, same version of TDM (4.1.5.8), and got the same access violation.

Message was edited by: tnagle

I tracked down the solution (Settings -> Options -> Expert Mode -> Clear "Save the definitions to 'My Package'" checkbox) and was able to see and select the "Customize form as..." option in the context menu.

Unfortunately, when I select that option it thinks for a seconds and then pops up an access violation. If you continue on without restarting the application you see the Package List, but the RenameRelation package is not shown.

Screen captures of the package list dialog, error report general info tab, and call stack tab are attached as images.

Any ideas?

Thanks!
-Tom

Addendum: This morning I tried this process on my old laptop running 32-bit XP Pro, same version of TDM (4.1.5.8), and got the same access violation.

Message was edited by: tnagle

I’m re-opening this while the access violation is still unresolved.

Hi,

after importing the package, did you restart Toad Data Modeler? Restart is required, otherwise the package will not appear there.

If you still get errors, try to delete your MyPackage file (backup it first) and start TDM.
Regards,

Vaclav

Hi Vaclav,

No change. And, yes, I did restart TDM.

Sorry to say, but I think there is some sort of defect at work here. I have exactly the same behavior on two separate computers (one XP Pro, one Win 7):

  1. Select “Customize Form as…”

  2. An error dialog (screen capture attached) pops up reporting an access violation.

  3. The package list appears as shown in my previous posts.

When I tried this on the old computer (XP Pro), I didn’t go through the entire process. I just opened TDM, made sure export mode was set up correctly, opened a table on the physical model, selected “Customize Form as…” from the context menu, and bang: access violation.

You are not able to replicate this using TDM 4.1.5.8?

-Tom
error-dialog.png

Hi,

there seems to be a problem with package dependencies. When you open Package Explorer, do you see packages with exclamation mark? If yes, then you have two possibilities.

  1. Delete those packages from INSTALLDIR\Packages\System\
  2. Install TDM with support for all target database platforms.

We added new change request to our system. CR 98560.

Regards,

Vaclav

I reinstalled TDM, including all target data platforms this time, and the problem resolved.

Thank you for your help, your proposed solution described in the associated video was exactly what I needed.

-Tom