Return multiple values from child table

Hello 

Im trying to return multiple values from child table.

When i set the expression to : table name [column name] it return all values from that column.

I tried to use lookup but it returns only one value from childs record

Is there any way to return all related childs only ? 

 

 

Solved Solved
0 6 137
2 ACCEPTED SOLUTIONS

Your parent table may already have a virtual column automatically created by AppSheet that uses a REFROWS expression and provides a convenient list of child rows. If not, you may not have linked your tables in an optimized fashion. Regardless, you can use an expression along the lines of the following wherever you need it:

SELECT(ChildTable[Child Key Column], [Child Key Column] = [_THISROW].[Parent Key Column])
Edited to remove ambiguity:
SELECT(ChildTable[Child Key Column], [Child Table’s Column Refernecing Parent Table’s Key Column] = [_THISROW].[Parent Key Column])

 

View solution in original post

Saw a typo..

SELECT(ChildTable[Child Key Column], [Column in ChildTable referencing ParentTable] = [_THISROW].[Parent Key Column])

 

View solution in original post

6 REPLIES 6

Your parent table may already have a virtual column automatically created by AppSheet that uses a REFROWS expression and provides a convenient list of child rows. If not, you may not have linked your tables in an optimized fashion. Regardless, you can use an expression along the lines of the following wherever you need it:

SELECT(ChildTable[Child Key Column], [Child Key Column] = [_THISROW].[Parent Key Column])
Edited to remove ambiguity:
SELECT(ChildTable[Child Key Column], [Child Table’s Column Refernecing Parent Table’s Key Column] = [_THISROW].[Parent Key Column])

 

Saw a typo..

SELECT(ChildTable[Child Key Column], [Column in ChildTable referencing ParentTable] = [_THISROW].[Parent Key Column])

 

Yes, of course. Sorry for the ambiguity! In the reference you corrected, I wasn’t thinking of the child table’s key but rather the child table’s column that references the parent table’s key column. 

I knew what you meant, therefore, a "typo".

AppSheet mentor and mindreader!

First of all thank you guys for sharing knowledge.

it worked 

just to be more clear i had my tables connected with a ref but i was struggling to return more than one value while using lookup function  how ever with select function it worked 

Thanks again 

Top Labels in this Space