Sum total from enumlist

Hello everybody
consider that I am trying to learn…
I ask some pious soul to help me with this problem:
I have two tables:

  • products
  • sales
    from the sales table I should automatically calculate the total price of the products chosen from a ref field of type enumlist populated from the products table.
    I have tried various ways, but it fails, I used the following formula:
    SUM (SELECT (PRODUCTS [PRICE], IN (PRODUCTS [PRODUCT_ID], [_ THISROW]. [PRODUCT]), PRODUCTS [TYPE] = [_ THISROW]. [PRODUCT]))
    I’d like to use a for loop to solve, but I don’t know the syntax and don’t even know if it’s possible.
    Can anyone help me?
    Thank you
0 2 315
2 REPLIES 2
Top Labels in this Space