You can follow what Atanu mentioned.
Just so you are aware... there is an alternate shorthand that you can use as well, it suites your use-case better since you are operating within the context of the table. You are probably aware of the '@{<ControlId>}' syntax to refer to value of a field. Inside a table this syntax takes a bit different form to reference the control in the current row using '@{<ControlId>=}'. Notice the '=' after the control Id.
So, for simplicity, let's say your controls are named unitPrice and quantity. Then in the Total field's Events > under Value formula you can enter the follow: @{unitPrice=} * @{quantity=}
------------------------------
Ajay Katre | Salient Process
------------------------------
Original Message:
Sent: Wed July 07, 2021 10:55 AM
From: Atanu Roy
Subject: How to calculate the data in the table
You need to write something similar to below snippet in the change event of unit price and quantity if you are looking to update total price on change of these two fields -
var index = me.ui.getIndex();page.ui.get('/table_control_id/totalPrice_control_id['+index+']').setData((page.ui.get('/table_control_id/quantity_control_id['+index+']').getData())*(page.ui.get('/table_control_id/unitPrice_control_id['+index+']').getData()));
------------------------------
Atanu Roy
Original Message:
Sent: Wed July 07, 2021 10:33 AM
From: ding wei
Subject: How to calculate the data in the table

As shown in the figure above, a table needs to calculate:
Total = unit price * quantity
------------------------------
ding wei
Original Message:
Sent: Wed July 07, 2021 09:47 AM
From: Atanu Roy
Subject: How to calculate the data in the table
Hi Ding,
The question is not very clear, can you please elaborate the requirement?
If you are trying to access rows of a table from UI Toolkit, this document may help you -
https://developer.ibm.com/recipes/tutorials/accessing-index-of-a-row-data-cell-coach-view-instances-bpm-ui-toolkit-table-control/
------------------------------
Atanu Roy
Original Message:
Sent: Wed July 07, 2021 12:53 AM
From: ding wei
Subject: How to calculate the data in the table
I want to calculate each row of data in the table. How can I achieve this? Can you give me an example.
------------------------------
ding wei
------------------------------