# Script to apply a table property to all entities.

**URL:** <https://forums.toadworld.com/t/script-to-apply-a-table-property-to-all-entities/2244>\
**Category:** Toad Data Modeler\
**Created:** [March 24, 2010, 12:04pm UTC](https://forums.toadworld.com/t/script-to-apply-a-table-property-to-all-entities/2244 "2010-03-24T12:04:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfoster](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/dfoster/32/48_2.png) [@dfoster](https://forums.toadworld.com/u/dfoster)\
**Post date:** [March 24, 2010, 12:04pm UTC](https://forums.toadworld.com/t/script-to-apply-a-table-property-to-all-entities/2244/1 "2010-03-24T12:04:22Z")

</div>

Hi all,

This is my first post in this forum so please forgive any blunders.

I need some pointers for how I could write two scripts

1. A script that would add “ROWDEPENDENCIES” to every entities’ table property section.

2. A script that would set every relationship’s referential integrity to ‘CASCADE ON DELETE’

Any help much appreciated.

Regards

David

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [March 25, 2010, 6:35am UTC](https://forums.toadworld.com/t/script-to-apply-a-table-property-to-all-entities/2244/2 "2010-03-25T06:35:02Z")

</div>

Hi David,

Please find attached the script.

If you have any questions, please write us back. Thanks.

Regards,

Vladka + Mario  
[script.txt](https://global.discourse-cdn.com/quest/original/2X/4/45dee5ba9456ca5db842ab01b262f159b31b4fbe.txt) (1.11 KB)

---

<div class="post-metadata">

**Author:** ![dfoster](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/dfoster/32/48_2.png) [@dfoster](https://forums.toadworld.com/u/dfoster)\
**Post date:** [March 31, 2010, 8:45am UTC](https://forums.toadworld.com/t/script-to-apply-a-table-property-to-all-entities/2244/3 "2010-03-31T08:45:33Z")

</div>

Awesome thank you.

Is there an object model anywhere that is available in a digestible form (I am not a guru programmer type)

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [March 31, 2010, 8:58am UTC](https://forums.toadworld.com/t/script-to-apply-a-table-property-to-all-entities/2244/4 "2010-03-31T08:58:52Z")

</div>

Hi David,

I’m not perfectly sure what you mean. Anyway, possibly you’re asking about our Reference Guide.

1. Please enable Expert Mode: Select Settings | Options | General | select the Expert Mode checkbox | confirm OK.
2. Select Help | Reference.

If I’ve misunderstood, please write me back. Thanks.

Regards,

Vladka

---

<div class="post-metadata">

**Author:** ![dfoster](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/dfoster/32/48_2.png) [@dfoster](https://forums.toadworld.com/u/dfoster)\
**Post date:** [March 31, 2010, 10:04am UTC](https://forums.toadworld.com/t/script-to-apply-a-table-property-to-all-entities/2244/5 "2010-03-31T10:04:58Z")

</div>

Hi Vladka,

The reference guide seems to be very application level.

Searching through I found the property TableProp buried deep in the PEREntityOR\* classes. How would you know that you can call that as Entity.TableProp (please remember I am not a hardcore OO programmer)?

Regards

David

---

<div class="post-metadata">

**Author:** ![Vaclav\_Frolik](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vaclav_frolik/32/12_2.png) [@Vaclav\_Frolik](https://forums.toadworld.com/u/Vaclav_Frolik)\
**Post date:** [April 1, 2010, 4:17am UTC](https://forums.toadworld.com/t/script-to-apply-a-table-property-to-all-entities/2244/6 "2010-04-01T04:17:15Z")

</div>

Hi,

please have a look at the User Guide, section Customization - Sample. In topic “Access Property Values via Scripting Window” you will find information about how to search or use the Referece Guide document. In general, if you work with physical model, look for PER (Physical Entity Relationhip) and if you work with Oracle, look for OR\* classes. (LER is for logical model).

I hope it helps.

Regards,

Vaclav
