Subtotal total when still adding

Hello, in Order/Oder Delatlhes when I add the value and bring the SUBTOTAL which is a calculator field so far so good.Is it possible, when adding in real time, to bring the TOTAL of the SUBTOTAL?

What did you mean by to bring the TOTAL of the SUBTOTAL ? Please explain it in more detail.

In ORDER DETALES you have the fields:Products - Quantity - Value - Discount - Subtotal
computer - 02 - 10 - 0 – 20
Motherboard - 3 - 5 - 0 - 15
Total - - - - - - - - - - - - - - – 35Go calculating and showing the total when typing.

If your form is a Master/Detail Add page, then you may use the Total field in Master table to display the Total of your Subtotal based on keypress/change event of the textbox in the Detail grid table.

I don’t know if I was understood.
I would like you to be adding in the details table to show the SUBTOTAL and the TOTAL at the end of the grid.If you have a topic here on the forum talking about the subject or if you can give an example using the demo project, I appreciate it.

In your first post, you mentioned Orders as Master, and OrderDetales as Detail. Since it is a Master/Detail, then you may enable Master/Detail Add (as Detail) from Table setup of your OrderDetales table. That is what I mean with If your form is a Master/Detail Add page in my previous post above.Since the detail grid table is not supported to display aggregate function in the Total of Subtotal, then you should have a Total field in Master table. If not, then you may create that field in your master table. After synchronizing the change in your database to your project, then you may display the sum of SubTotal in your detail grid table to Total field in master table.

That’s right, perfect.
I already enter and update the value of the Master table by:
Row_Inserted and Row_Updated.
But the Master table value field is hidden.I would like the compo value of the Master table to be disabled and showing the sum of the SUBTOTAL of the details table in real time, is it possible?

Or it could just somehow show the Subtotal Total in real time in some part of the detail table, it could even be in Page_DataRendering or Page_DataRendered

You should use Client Side Events. In your event handler, you should create a HTML element for the total (e.g. a

under the detail table grid) and update it when any related fields are updated on change/keypress.

I have no idea how to put this html in the details table, but I will search, at the moment I did the following:In the details table in the Subtotal field, I put this function:

{
"change keyup": function(e) {
var tt = 0;
$("#SUBTOTAL").each(function(){

$("[type='text'][data-field='x_SUBTOTAL']").each(function(){
tt = tt + parseInt($(this).val());
});

}

$("#x_flowValue").val(tt); // total order.

}
}

But without success.

  1. What is $(“#SUBTOTAL”)? Why looping through?
  2. You need to check if the value is empty first, otherwise tt = tt + parseInt($(this).val()); will result in NaN.
  3. Learn how to debug your JavaScript in your browser, see Debug JavaScript.
  1. SUBTOTAL is the field name of the detail table, the loop is to get the values typed in the detail table.
  2. x_flowValue is the field in the Master table where I want it to show the calculated values.

I don’t know if this way of doing it is more correct. for me I wanted to show the result of the sum of the SUBTOTAL field of the details table in the Page_DataRendering of its own vicaria more visible.If you can help me with any of the ways I would be very grateful.

I doubt if there is “#SUBTOTAL”. You may learn how to inspect HTML elements and find out the correct id or class, see Open the Elements panel to inspect the DOM or CSS.