# Calculate with Flow Fields

**URL:** <https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540>\
**Category:** Developers Forum\
**Created:** [November 30, 2001, 8:29am UTC](https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540 "2001-11-30T08:29:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lothar\_knichel](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@lothar\_knichel](https://www.dynamicsuser.net/u/lothar_knichel)\
**Post date:** [November 30, 2001, 8:29am UTC](https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540/1 "2001-11-30T08:29:43Z")

</div>

hey in a form are 3 fields. field1 is an flow field field2 is an decimal field(user input) field3 is an decimal field(field1-field2) When tha value of field1 is changed, field3 is not updated. Thanks for help. lothar knichel

---

<div class="post-metadata">

**Author:** ![Tarek\_Demiati](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@Tarek\_Demiati](https://www.dynamicsuser.net/u/Tarek_Demiati)\
**Post date:** [November 30, 2001, 9:09am UTC](https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540/2 "2001-11-30T09:09:43Z")

</div>

Field 1 one CANNOT be changed it it’s a flowfield, most flowfields in the standard application are set as non-editable at table level. Are those 3 fields on the same form ? ###### **[tarek\_demiati@ureach.com](mailto:tarek_demiati@ureach.com)**

---

<div class="post-metadata">

**Author:** ![stryk](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@stryk](https://www.dynamicsuser.net/u/stryk)\
**Post date:** [November 30, 2001, 9:44am UTC](https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540/3 "2001-11-30T09:44:40Z")

</div>

Hi!

> quote:
> 
> * * *
> 
> When tha value of field1 is changed
> 
> * * *

As far as “field1” is a flow field, i assume that you mean by “changed” that the **shown** value, calculated by “CalcFormula” has changed. To calculate “field3” you should use a small function:

```auto

Function Calc()
CALCFIELDS(field1);
field3 := field1 - field2;

```

This funktion should be called in _“field2” OnValidate() of the Table_ and _OnAfterGetRecord() of the Form_ This should do the job! Regards, Jörg Joerg A. Stryk Apollo-Optik, IT/ERP Edited by - stryk on 2001 Nov 30 10:45:42

---

<div class="post-metadata">

**Author:** ![lothar\_knichel](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@lothar\_knichel](https://www.dynamicsuser.net/u/lothar_knichel)\
**Post date:** [November 30, 2001, 1:18pm UTC](https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540/4 "2001-11-30T13:18:08Z")

</div>

Hallo Tarek, field1 is changed by the system and not by user. the fields are on the same form.

---

<div class="post-metadata">

**Author:** ![lothar\_knichel](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@lothar\_knichel](https://www.dynamicsuser.net/u/lothar_knichel)\
**Post date:** [November 30, 2001, 1:27pm UTC](https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540/5 "2001-11-30T13:27:02Z")

</div>

Hi Joerg, it works. Thanks Lothar Knichel

---

<div class="post-metadata">

**Author:** ![David\_Cox](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@David\_Cox](https://www.dynamicsuser.net/u/David_Cox)\
**Post date:** [November 30, 2001, 6:04pm UTC](https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540/6 "2001-11-30T18:04:14Z")

</div>

Sorry Guys noting clever required here on the form select fields 1 and 2 the non flowfields. Code OnAfterValidate() CurrForm.UPDATE; That will refresh the flowfield David Cox email: [david@mindsource.co.uk](mailto:david@mindsource.co.uk)

---

<div class="post-metadata">

**Author:** ![lothar\_knichel](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@lothar\_knichel](https://www.dynamicsuser.net/u/lothar_knichel)\
**Post date:** [December 4, 2001, 8:29am UTC](https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540/7 "2001-12-04T08:29:05Z")

</div>

Hi joerg, first i think it works but it doesn´t. When i change the value in field2 (FieldClass=normal) the field3(FieldClass=FlowField)is changed correctly. And i can use the value for other thinks. But when the value in field1 (FieldClass=FlowField)is changed the field3(FieldClass=FlowField)is changed only on the form correctly, and i can´t use the value for other functions. Lothar Knichel

---

<div class="post-metadata">

**Author:** ![lothar\_knichel](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@lothar\_knichel](https://www.dynamicsuser.net/u/lothar_knichel)\
**Post date:** [December 4, 2001, 8:35am UTC](https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540/8 "2001-12-04T08:35:22Z")

</div>

Hi David Cox, please read my last post to Joerg. Lothar Knichel

---

<div class="post-metadata">

**Author:** ![stryk](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@stryk](https://www.dynamicsuser.net/u/stryk)\
**Post date:** [December 4, 2001, 9:48am UTC](https://www.dynamicsuser.net/t/calculate-with-flow-fields/5540/9 "2001-12-04T09:48:22Z")

</div>

> quote:
> 
> * * *
> 
> But when the value in field1 (FieldClass=FlowField)is changed the field3(FieldClass=FlowField)is changed only on the form correctly, and i can´t use the value for other functions.
> 
> * * *

Thats rigth! Because field3 is based on a FlowField (which is not saved to the databese) I think it’s not neccessary to save field3 … Why is field3 a FlowField? It also could be a “normal” Field!? But, if you need to use the value of field3 in other functions, you should always run the function _Calc()_ (my little example) to make sure, that field3 has an actual value (Same as you use CALCFIELDS on FlowFields before use). Regards, Jörg Joerg A. Stryk Apollo-Optik, IT/ERP
