filtered related rows in template

hi,

i have related rows linked to a parent table.

 

when i want to display on my pdf the list of related rows, all is good. 

<<Start: [Related Matieres]>><<[ piquage]>><<end>>

 

But i would love to filter related rows .

<<Start: filter(“related Matiere,[CATEGORIE SPEC]=”Specifique”) >><< [piquage]>> <<end>>

where is my mistake?

 

thanks

Solved Solved
0 9 254
1 ACCEPTED SOLUTION

The "Related" columns cannot be treated like a Table or Slice (though I think they should be).  

You simply need to adjust your FILTER() to query against the base datasource of your "Related" column(table or slice), using the filter criteria that creates the "Related" rows PLUS your additional filtering criteria.

View solution in original post

9 REPLIES 9

The "Related" columns cannot be treated like a Table or Slice (though I think they should be).  

You simply need to adjust your FILTER() to query against the base datasource of your "Related" column(table or slice), using the filter criteria that creates the "Related" rows PLUS your additional filtering criteria.

Correct ! it works pefectly like that.

Thank you  so much !

Steve
Platinum 4
Platinum 4
select([related Matiere][key-column],[CATEGORIE SPEC]=”Specifique”)

Replace key-column with the name of that table's key column.

@Steve I haven't used that but I saw it before.

Should we consider Select(Table[Column]) and Select([Related Tables][Column]) technically the same thing but the second one with a less dataset (already filtered) and, basically, more performant?

Yep.

Excelent, that's something I expected but never actually tried

Hi

The first solution works

but i would like to learn about steve solution. I tried also likke that and 

"Error 1 : 'New process' task 'Edition Matiere' Body template. Expression 'select([related Matiere][Id_ligne],[CATEGORIE SPEC]=”Specifique”)' is invalid due to: Unable to find column 'related Matiere', did you mean 'Related Matieres'?."

"Id_ligne" is my key in table "Matiere"

The complaint is about the name of your "Related" column.  The automatic names given by AppSheet always inserts an "s" at the end of the name.  Your expression doesn't seem to include the "s".

ok i understand now where is my default.

thank you 

Top Labels in this Space