Table: Accessing column field in another column to utilize in aggregating/displaying data

I have looked at this topic Accessing Custom Column’s data from New Table Component, whose solution differs in what I envisage to to.

Goal: I need to use progress format for a field to show as displayed. This shows moneys paid and the balance. These figures would need to take into account 'number of children' that will multiply the balance accordingly.
In the field, I can access {{item}} of this PayAmount column but want also to use the ChildCount to accomplish that formatting/calculation.

The code accomplishing what is on display is as below
Paid:{{ item > 0? parseInt(item) : 0}} Balance: {{appSettingsAll.data[0].fee - item }}

P.S. appSettingsAll.data[0].fee = 1501.00 (price for 1 child) in this case

what I envisage doing is
the 'item' needs to take into account the number of childCount so that it either zeroes out ( item * 0) or doubles given multiple children...

Can you use currentSourceRow?

For example, I mocked up some additional data (paidAmt and ChildCount) to the demo data set, added it to a table, and then created a field where the value of the field is currentSourceRow.paidAmt with the caption being Paid: {{currentSourceRow.paidAmt}}, Due: {{currentSourceRow.ChildCount * 1500}} and the progress bar max being {{currentSourceRow.ChildCount * 1500}}

For you, 1500 would be your appSettingsAll.data[0].fee, and the fields referenced would be whatever they are named in your source table/data.

2 Likes

Thanks, That has resolved my issue nicely.
Did note it is only available in a custom column and not those from the main table.
Thanks again for quick solution.

1 Like