I have a form with 2 pages (Tabs), Tab1 and Tab2.
Page 1 has [ONENormal]
Page 2 has [TWONormal]
[TWONormal] sets fields on page 2
Click [ONENormal], it is a SETVALUES (overwrite), which clicks [TWONormal]
Page 2 shows no values populated.
BUT NOW, if I return to Page 1 and click [ONENormal] again
then visit Page 2, the fields are now populated.
Or if I first had clicked on Page 2 and back to Page 1, [ONENormal] would have worked.
So how can I get the form to work properly ??
I have tried adding a hidden button that gets clicked by [ONENormal] to do a JUMP_TO_PAGE to jump to Page 2, then clicks [TWONormal] - this doesn't fix the issue.
Any Tips on fixing this ? I have not had problems with this technique before...
- Beverly
I found a solution, but it is annoying to have to do this. I copied the fields from page 2 which are being set by the [TWONORMAL] button, and copied them into a hidden visability (FALSE) on page 1. Then the fields are populated first-try (on both pages). Why is this even necessary ?
I will leave this post here, hoping someone can explain this better..... Thanks - Beverly
For the document variables, see if checking the box that says "Make available to other form" makes a difference
Variables that appear on tabs other than the first tab, must be instantiated, for example,
{ ! document.tab2variable
document.tab3variable
}
They don't need to be assigned a default value, i.e. initialized, the form just needs to know that the fields exist. If the fields are addressed by other tabs aside from the one in which they appear, the box "Make available to other forms" must be checked. A tab is functionally a new form.
When you opened the tab manually, you instantiated the variable.
Very odd. If you're intersted in sending me the dlg, I would be happy to look over it, just as a second set of eyes. I'm somewhat intrigued! [email protected]
OK, I stripped out all the mel code in the form,
1) then on Tab 2, I checked "Make available to other forms",
on the fields that I wanted the [NORMAL] button on tab 1 to set.
When I loaded the form and clicked [NORMAL] - it did not set the values.
If I clicked on tab 2, then back to tab 1 and clicked [NORMAL} again, it set the values on Tab 2.
2) Next, I declared the fields on Tab 2 in the MEL area (only those fields I wanted SETVALUES to update). I removed the "Make available to other forms" checks.
Now, the first time the form is loaded, clicking the [NORMAL] btn on tab 1 works, and sets the values on tab 2.
I had tried this (step 2) on my original form, but it did not work - so its just something weird in the MEL that I'll have to track down.
Thanks all for your help.