Toad World® Forums

Default values... (and application variables)


this is something I’ve already asked some time ago, nothing changed on this, but I still think is something really really useful…

I really appreciate the default values (Settings->Default values just to be clear), but for me is missing something really important: something that allow to take a specified portion of application variables and not the whole application variable…

for example, in caption/name instead of having for example <%ParentTableName%>fk<%ChildTableName%> having something like <%ParentTableName%:5>fk<%ChildTableName%:5> that means, "take only the first 5 chars of parent and table name and mix them with a middle fk

so a relation between ac000_customers and af000_suppliers becomes ac000_fk_af000

This seems fancy, and of limited use for those (like me) that have and unique prefix identifying each and every table in database, but could be useful, for example, also in case that constraint names have a length limitation imposed by database rules, and combination of parent table name + fk + child table name (that I think is pretty common around) exceed such limit, and are forced to fix by hand relations like my_very_very_long_parent_table_name_fk_my_very_very_long_child_table_name … that exceed max length admitted for fk constraint names in database…

What do you guys think about???

Hello Roberto,

You can actually do that, but it requires a little more advanced customization and not many users are aware of this possibility.

I don’t know if I should go into details. Is there any custom application variable you urgently need? If not, I would wait a few days, there should be article published in near future which explains how to create your own custom application variables.