Looking up data into a custom table column

Hey @pod2,

This should be doable if you have both product_id and customer_id in the same row. You could create a custom column and in the mapped value use a find, e.g

{{ getCustomerSales.data.find ( x => x.customer_id === selectedSourceRow.customer_id && x.product_id === selectedSourceRow.product_id).sales }}

Assuming that:

  1. You're getCustomersales.data is formatted as an array,
  2. There are matches for all combinations (otherwise the find function will return an error, and you will have to account for that scenario in the function)

You should be getting the result you want.

I hope I understood this correctly and that this guides you towards a solution!

1 Like