manual update

F

Fred

I have a big form with lots of formula, the form is getting very slow
when use entering data, because the data change cascade to other
elements by formula. I find that there is option in default value ,
"update this value when the result of the formula is recalculated". By
default this is enabled, I think want to disable it to reduce
automatic cascading change. My question is if I disable this check
box, how do I manually update the node by using the formular in the
default value box.?

Thanks
 
C

Clay Fox

Hi Fred.

The amount of data, the number of views, the number of controls, and how the
data is managed - can all impact performance.
You can use rule actions to set field values rather than having them default
and this might improve your perofrmance depending on the form layout and data
structure. You would need to trigger an update via an action on another field
or via a button, but then you have to set each field individually.

Often good form design and architecture can make a huge difference in form
performance.
If you need professional help with this let me know.
 
F

Fred

Thanks for your reply, but the rule actions bascially is the same as
default(formular), because it cascades the changes to other elements.
My goal is try to reduce the automatic cascade of change, but I still
want to leverage power of the fomula. Now I have simplified example,
Suppose I have p1 and p2 element, so I can set p3's default value to
p3=p1 + p2, this can be done using xpath expression. Now I disable the
automatic update of p3, even when p1, p2 change, and I add a button to
form with event handler, its job is update p3 with p1 + p2. In the
event handler, I can write some code like these,

double p1 =
this.MainDataSource.CreateNavigator().SelectSingleNode("p1",
this.NamespaceManager).ValueAsDouble;
double p2 =
this.MainDataSource.CreateNavigator().SelectSingleNode("p2",
this.NamespaceManager).ValueAsDouble;
this.MainDataSource.CreateNavigator().SelectSingleNode("p3",
this.NamespaceManager).SetTypedValue(p1 + p2);

this works, be it lacks the simplicity of xpath, for this simplified
example, this is not a problem, but if formular is more complicated,
the code will be messy.
my goal is write some pseudo code below

double result =
this.MainDataSource.CreateNavigator().SelectSingleNode("p1 + p2",
this.NamespaceManager).ValueAsDouble;
this.MainDataSource.CreateNavigator().SelectSingleNode("p3",
this.NamespaceManager).SetTypedValue(result);

I know it doesn't work, because it is pseudo :), but is there any
solution that implement my idea?
Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top