# Calculations in Methods

**URL:** <https://forum.servoy.com/t/calculations-in-methods/9178>\
**Category:** Classic Servoy\
**Created:** [June 11, 2008, 2:14pm UTC](https://forum.servoy.com/t/calculations-in-methods/9178 "2008-06-11T14:14:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prj311](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@prj311](https://forum.servoy.com/u/prj311)\
**Post date:** [June 11, 2008, 2:14pm UTC](https://forum.servoy.com/t/calculations-in-methods/9178/1 "2008-06-11T14:14:10Z")

</div>

Hi All  
Can I perform a calculation within a **method** and return the result to a data provider ?

eg. something like

field A = (field B - field C) or field A = (field B + field C)??

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [June 11, 2008, 9:43pm UTC](https://forum.servoy.com/t/calculations-in-methods/9178/2 "2008-06-11T21:43:58Z")

</div>

Hi Phil,

A calculation is in fact a method that is automatically triggered when some information in that records changes.  
And in methods you can set dataproviders. But you have to take care of the trigger yourself (using any of the provided field/form events or doing it manually).

Hope this helps.
