Referencing a Column value in a Table, versus referencing ALL Column values in the entire Table

Having answered this question about 1 million times now, I guess I should make a tips-and-tricks post about it.

Expressions of the form

Table[Column]

return a List type data value that contains the values in Column for ALL records in the entire Table.

Most likely, If I’ve referred you to this post, the answer to your question is simply to change it to just:

[Column]

One of the most common places I’ve seen new app builders use this, is within SELECT() expression, like:

SELECT(
  Table[Column] ,
  Table[Column] = "X"
)

The second argument in SELECT(), the “condition”, is evaluated iteratively across every record in the Table, from the context of each individual record. Which is why you can just use [Column]. So you change to:

SELECT(
  Table[Column] ,
  [Column] = "X"
)

For reference:

Edit:
Good suggestion from @MultiTech_Visions:
An additional helpful tip, you can freely replace “Table” with the name of any Slice and expressions work the same way, but only reference records from the Slice instead of the entire Table.

Slice[Column]
9 Likes

Nice one!

Maybe include something about how slices and tables are essentially the same in this situation.

7 Likes

I have one question. That I can’t display ref data on PDF workflow Is it related to SELECT()?

Template
Screen Shot 2021-08-03 at 14.25.31

PDF

I’m afraid to disturb others. If possible, can you please reply to this link?

https://community.appsheet.com/t/how-to-created-pdf-when-adding-new-record-in-reference-table-data/52192

Hopefully, you can help me out.