Building a custom Template, Expression issues

Hello everyone, again, this time I am trying to build a custom email template, I need to filter through a “START+SELECT” which led me to build the following.


I am getting the following errors.

Error: ‘Email’ task ‘Send an email 2’ Attachment template. Expression ‘SELECT([EXISTENCIA_DE_BATERIA][RECORRIDO], [RECORRIDO]=RECORRIDO[ID])’ is invalid due to: Column ‘EXISTENCIA_DE_BATERIA’ is used in a SELECT or list dereference expression and should be a List/EnumList of Refs. Error: ‘Email’ task ‘Send an email 2’ Attachment template. Start expression ‘SELECT([EXISTENCIA_DE_BATERIA][RECORRIDO], [RECORRIDO]=RECORRIDO[ID])’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table.

I don’t quite understand what I am doing wrong or why Appsheet is not understanding the expression correctly.

I need to get the data from a specific table, the idea is appsheet makes a loop with the “START” only returning the information filtered by the [ID]=RUN[ID] so it doesn’t get the whole data history.