Update Calculated Fields

Questions, tips and tricks and techniques for scripting in Servoy

Update Calculated Fields

Postby Alan » Thu Mar 11, 2004 8:48 pm

How do I force an update of calculated fields? I can't find the post.
Alan
 
Posts: 12
Joined: Mon Jan 19, 2004 10:32 pm

Postby jcompagner » Fri Mar 12, 2004 11:09 am

you can set it to null then it should refresh.

But why do you need it. It should refresh by it self. Do you have a example where you see an calculation not updating?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Calculated Fields

Postby Alan » Sat Mar 13, 2004 12:32 am

I have a field that can be changed that is not in the calculation itself.
If ordertype = "Customer"
total = a*b
if ordertype = "Inter Division"
total = a* c

etc

I want the calculation to update based on ordertpye. I am doing this because I cannot make fields invisible at the print preview level. Otherwise I will have to make mutliple invoice layouts for each order type.
Alan
 
Posts: 12
Joined: Mon Jan 19, 2004 10:32 pm

Postby jcompagner » Sat Mar 13, 2004 1:11 am

i sitll don't know exactly what you have.

do you have a calculation "total"
that does:

If(ordertype = "Customer")
return a*b;
else if(ordertype = "Inter Division")
return a* c;

this should work fine. so please send an example..
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Methods

Who is online

Users browsing this forum: No registered users and 25 guests