How do I get the value of a related table that is part of another table?

Good day friends,
I have a problem, I want to get a value from a table that is part of another, but I can’t find the correct formula to get that value.
The table where I want to obtain the Value is in “VENTAS” and the table from which I want to obtain the value is called “CONCEPTOS VENTAS”.

Table “VENTAS”

Table “CONCEPTOS VENTAS”

The Value that I want to obtain is that of the virtual column “PAGO SEMANAL 13 SEMANAS” of the “CONCEPTOS VENTAS” table in the “VENTAS” Table.

Thank you so much

Dereference expressions - AppSheet Help

3 Likes

If I understand you correctly…

Since the relationship between VENTAS and CONCEPTOS VENTAS is 1 to M, a row in VENTAS has more than one related CONCEPTOS VENTAS rows (therefor PAGO SEMANAL 13 SEMANAS values) . You can get a list of these multiple values by using a Dereference a list expression like [CONCEPTOS VENTAS Related (you changed the default name here?)][PAGO SEMANAL 13 SEMANAS].

Important note: The value you get is a list and not compatible with the “price” type of PAGO SEMANAL (S)

*You could sum up the related prices by SUM([CONCEPTOS VENTAS Related][PAGO SEMANAL 13 SEMANAS])

3 Likes

Good morning dear,

You are right, I think I will take it as the sum of a list, because you can have several weekly payments in a single sale with several items sold.

Thank you very much for your help.