# Initialize Forms, How to

**URL:** <https://forum.inductiveautomation.com/t/initialize-forms-how-to/3268>\
**Category:** Ignition\
**Created:** [September 8, 2011, 8:06pm UTC](https://forum.inductiveautomation.com/t/initialize-forms-how-to/3268 "2011-09-08T20:06:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpollock](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@kpollock](https://forum.inductiveautomation.com/u/kpollock)\
**Post date:** [September 8, 2011, 8:06pm UTC](https://forum.inductiveautomation.com/t/initialize-forms-how-to/3268/1 "2011-09-08T20:06:35Z")

</div>

I am a new Ignition User, but in 2 months I have a fairly Mature MFG HMI. I would like to set initial conditions on a user entry form as shown in the attachment, but I have not been able to find a mechanism to do this. I need to set the treeview to index value -1 ( and possibly other parameters) on the form open event. I am already passing parameters to the form, but I need a one shot pass on form open only.

Has anybody done something similar.

Thx Ken

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/baf1c794ef732a34b99a494ab2bd56d91af807fb.JPG)

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [September 8, 2011, 9:19pm UTC](https://forum.inductiveautomation.com/t/initialize-forms-how-to/3268/2 "2011-09-08T21:19:02Z")

</div>

There are three standard strategies for initializing forms on open:

1. Change the window’s cache policy to “Never”. It will be “fresh” every time you open it.
2. Bind the things that need initializing to expressions holding their appropriate initial value.
3. Write an “internalFrameActivated” event to have a script initialize things.

Those are in order of how easy they are.

---

<div class="post-metadata">

**Author:** ![kpollock](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@kpollock](https://forum.inductiveautomation.com/u/kpollock)\
**Post date:** [September 8, 2011, 10:31pm UTC](https://forum.inductiveautomation.com/t/initialize-forms-how-to/3268/3 "2011-09-08T22:31:58Z")

</div>

Excellent, I went with #1 and it works fine. I am glad I asked, I spent a couple hours exploring features and was getting into increasing convoluted scripts. In 2 months of focused development we are far ahead of 18 months with a competitor’s legacy HMI. When I proposed Ignition I estimated that payback in reduced support costs would be in 6 months and that continues to be true.

THX Ken

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [September 9, 2011, 12:57am UTC](https://forum.inductiveautomation.com/t/initialize-forms-how-to/3268/4 "2011-09-09T00:57:31Z")

</div>

Ken - good to hear that worked. Don’t be a stranger on the forum.
