# JScript: How to understand the object structure and find out possible property names

**URL:** <https://forums.toadworld.com/t/jscript-how-to-understand-the-object-structure-and-find-out-possible-property-names/29107>\
**Category:** Toad Data Modeler\
**Created:** [March 5, 2014, 2:50am UTC](https://forums.toadworld.com/t/jscript-how-to-understand-the-object-structure-and-find-out-possible-property-names/29107 "2014-03-05T02:50:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fheuer](https://avatars.discourse-cdn.com/v4/letter/f/8dc957/32.png) [@fheuer](https://forums.toadworld.com/u/fheuer)\
**Post date:** [March 5, 2014, 2:50am UTC](https://forums.toadworld.com/t/jscript-how-to-understand-the-object-structure-and-find-out-possible-property-names/29107/1 "2014-03-05T02:50:38Z")

</div>

Hallo,

I try to do some scripting to automatic clearing the “Using Index Property” of Oracle primary keys. So I dowloaded some JScript examples and take a look at the “Reference Guide” under “Expert Mode”. Until now I did not find out, how to easily walk along the object tree. I even do not now the Object Names and a call to Key.SupportsProperty(“Using Index Properties”) (Key is Entitie.Key) does never return true.

So where to find a documentation or a way to get the technical names of Objects and Properties.

Regards

Frank

---

<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:** [March 5, 2014, 7:18am UTC](https://forums.toadworld.com/t/jscript-how-to-understand-the-object-structure-and-find-out-possible-property-names/29107/2 "2014-03-05T07:18:47Z")

</div>

Hi Frank,

to quickly clear the Index Properties:

1. Enable Expert Mode in settings

2. Click **Expert Mode | Scripting Window...**

3. In the Scripting Window select your model and move it to right side, change **Name in Script** to **Model.**

4. Run the script that iterates indexes in your entities and sets the IndexProp to empty value.

![indexprop.png](https://global.discourse-cdn.com/quest/original/2X/c/c560ff55f9fec15a066e64e56e369320b7180a3b.png)

Object types, properties and methods are available in Reference Guide. Click **Expert Mode | Reference Guide** to open the documentation.

 ![indexprop2.png](https://global.discourse-cdn.com/quest/original/2X/a/a77bcb660cfcfb39af448267b21dd96eb4d42c69.png)

Index properties are part of PERIndexOR class (PER = physical ER model, OR = Oracle specific)

I hope it helps,

Vaclav

[View:~/cfs-file.ashx/\_\_key/communityserver-discussions-components-files/31/script\_2D00\_remove\_2D00\_indexprop.txt:550:0]

---

<div class="post-metadata">

**Author:** ![fheuer](https://avatars.discourse-cdn.com/v4/letter/f/8dc957/32.png) [@fheuer](https://forums.toadworld.com/u/fheuer)\
**Post date:** [March 6, 2014, 12:25am UTC](https://forums.toadworld.com/t/jscript-how-to-understand-the-object-structure-and-find-out-possible-property-names/29107/3 "2014-03-06T00:25:42Z")

</div>

Hallo Vaclv,  
thank your for your advice. Here are two things to clearify:

First, i did not mean the index properties, i meant the key properties.

![TDMKeyProp.png](https://global.discourse-cdn.com/quest/original/2X/f/f3ea873c82fd9d3e7cd13f70ebf087c5328a34be.png)

As you know, in oracle primary key and index are nearly the same. So in my case, I just want to clear the storage and logging clause.

The PK\_ANSCHRIFT is not listed in the index list, it is listed in the key list!

Second: I knew the “Reference Guide” but find it hard to read. So i.e. the indexes. How to know, that from the index view, tab “Index Properties” the jScript IndexProp="" only cleares the free text (STORAGE CLAUSE i.e.) and not the tablespace or other entries?

A bit more example code on the web side would be great. And there is missing a list of valid values for the PropertyValueByName ParamName parameter.

---

<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:** [March 6, 2014, 1:22am UTC](https://forums.toadworld.com/t/jscript-how-to-understand-the-object-structure-and-find-out-possible-property-names/29107/4 "2014-03-06T01:22:09Z")

</div>

Hi,

OK, my apologies. I modified the script.

[View:~/cfs-file.ashx/\_\_key/communityserver-discussions-components-files/31/script\_2D00\_remove\_2D00\_pkusingindexprop.txt:550:0]

It is necessary to iterate Keys in every entity. Tablespaces will remain untouched.

 ![keyprop.png](https://global.discourse-cdn.com/quest/original/2X/b/b3e70d1b3dd5dbdd956cd65c14e6a70bed443bcc.png)

The following screenshot shows how to use PropertyValueByName: You can pass there supported property name and its value will be returned.

 ![propbyname.png](https://global.discourse-cdn.com/quest/original/2X/f/f80d1edf19a006feb611e44245c09c308d2f74e7.png)

Regards,

Vaclav

---

<div class="post-metadata">

**Author:** ![fheuer](https://avatars.discourse-cdn.com/v4/letter/f/8dc957/32.png) [@fheuer](https://forums.toadworld.com/u/fheuer)\
**Post date:** [March 6, 2014, 2:19am UTC](https://forums.toadworld.com/t/jscript-how-to-understand-the-object-structure-and-find-out-possible-property-names/29107/5 "2014-03-06T02:19:47Z")

</div>

Hallo Vaclav,

thx a lot. Main problem was, that the GUI did not name the textfield, that contains the storage clause. So in jScript I thought that I have to walk to something named “UsingIXClause” or “UsingIndexClause” an so forth and than iterate through that to get to the textfield entry. I did not now and could not find in the documentation that it is ordered that way. Maybe I was blind or a bit confused. Thank so far.

Regards

Frank

---

<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:** [March 6, 2014, 2:22am UTC](https://forums.toadworld.com/t/jscript-how-to-understand-the-object-structure-and-find-out-possible-property-names/29107/6 "2014-03-06T02:22:30Z")

</div>

You are welcome. I am glad I could help you. In case you need more information, feel free to post your questions here. The documentation cannot cover all possible customization tasks.

Regards,

Vaclav
