I need to create a flowfield but which sums up a number of columns and this function is not present in the default flowfield functions. Anyone has got any idea how this can be done?
First create different flowfields with the SUM-CalcFormula, for each column:
Flowfield1: SUM of a specific column A in another table
Flowfield2: SUM of a specific column B in another table
Flowfield3: SUM of a specific column C in another table
On your form, you can then add a TextBox-control with following SourceExpr: Flowfield1 + Flowfield2 + Flowfield3
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
First create different flowfields with the SUM-CalcFormula, for each column:
Flowfield1: SUM of a specific column A in another table
Flowfield2: SUM of a specific column B in another table
Flowfield3: SUM of a specific column C in another table
On your form, you can then add a TextBox-control with following SourceExpr: Flowfield1 + Flowfield2 + Flowfield3
Unfortunately I think that this wont work, it will return zero. You need to put a calcfields int here somewhere, and this can only be done in code. Unfortunately the Form Property "CALCFIELD" is there purely for decoration.
If you want to do this without code, then you need to add all three fields to the form so that they are calculated.
First create different flowfields with the SUM-CalcFormula, for each column:
Flowfield1: SUM of a specific column A in another table
Flowfield2: SUM of a specific column B in another table
Flowfield3: SUM of a specific column C in another table
On your form, you can then add a TextBox-control with following SourceExpr: Flowfield1 + Flowfield2 + Flowfield3
Unfortunately I think that this wont work, it will return zero. You need to put a calcfields int here somewhere, and this can only be done in code. Unfortunately the Form Property "CALCFIELD" is there purely for decoration.
If you want to do this without code, then you need to add all three fields to the form so that they are calculated.
Yes, you are right. FlowFields are only automatically calculated in a direct source expression. In indirect source must be place CALCFIELDS in Form after getting record.
If you want to do this without code, then you need to add all three fields to the form so that they are calculated.
Indeed. Don't know if the 3 flowfields are calculated, if they are present on the form with Visible = No.
When a form opens, it looks to see which fields are currently visible on the form, and these fields are then added to the list of fields to be calculated. If you then make the fields non visible, then they will continue to calculate, but i you close the form and re-open it, then they are no longer calculated.
If you don't have access to code, then you can do it by creating a function in a report. Other wise you have to have all three fields visible, you can do this by adding them directly on the form, and then hiding them under some control.
I must have been misunderstood; the flowfield which I need to create is to be created in a table and not in a form. Practically I have a column which should be the summation of three columns which are found in the same table. for example I have tabel with columns A, B, C and D. I need that D to be the summation of A + B +C
I must have been misunderstood; the flowfield which I need to create is to be created in a table and not in a form. Practically I have a column which should be the summation of three columns which are found in the same table. for example I have tabel with columns A, B, C and D. I need that D to be the summation of A + B +C
Yes you are correct. For some silly reason, when you said FLOWFIELD, I thought you meant you wanted to use a flow field.
In your case, I guess what you really want is to store the sum of A,B,C in a new field D and have that value saved in the table.
Or if all you need is to know the sum of the fields, just use
D := A + B + C; where ever you need the number.
Comments
Flowfield1: SUM of a specific column A in another table
Flowfield2: SUM of a specific column B in another table
Flowfield3: SUM of a specific column C in another table
On your form, you can then add a TextBox-control with following SourceExpr: Flowfield1 + Flowfield2 + Flowfield3
Unfortunately I think that this wont work, it will return zero. You need to put a calcfields int here somewhere, and this can only be done in code. Unfortunately the Form Property "CALCFIELD" is there purely for decoration.
If you want to do this without code, then you need to add all three fields to the form so that they are calculated.
Yes, you are right. FlowFields are only automatically calculated in a direct source expression. In indirect source must be place CALCFIELDS in Form after getting record.
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
When a form opens, it looks to see which fields are currently visible on the form, and these fields are then added to the list of fields to be calculated. If you then make the fields non visible, then they will continue to calculate, but i you close the form and re-open it, then they are no longer calculated.
If you don't have access to code, then you can do it by creating a function in a report. Other wise you have to have all three fields visible, you can do this by adding them directly on the form, and then hiding them under some control.
Yes you are correct. For some silly reason, when you said FLOWFIELD, I thought you meant you wanted to use a flow field.
In your case, I guess what you really want is to store the sum of A,B,C in a new field D and have that value saved in the table.
Or if all you need is to know the sum of the fields, just use
D := A + B + C; where ever you need the number.
Where are you planning to use this field "D" ?