Why we use "document.form(0)"?

There is a little doubt in my mind that whenever we use an object either in lotus script or javascript, we access the objects like form/field through document.form(0), why not just only document.form.

i have been using it without proper justification of why.

can any one please clear my doubt.

waiting for reply…

sam

Subject: why we use “document.form(0)”?

Because all notes items (of which form is one), are stored as arrays.

Just because a field only has a single value doesn’t mean it is stored as a single bit of text, it is still stored as an array, the first value of which is (0).

If you have a bit of script, run through it in the debugger and look at the form properties, under Items - this will give you all the properties of the fields and a better understanding of what is actually stored in the database.

Dan

Subject: RE: why we use “document.form(0)”?

Thanx Dan…i was having a notion that it is somthin related to array, but now the concept is crystal clear…

thanx again

sam