Hi There,
I have the following table structure:
Table Parent (Name, Address, Oldest_Child)
Table Child(Name, Parent_Name[Reference to Parent],age)
I want to populate the parent.oldest_child with the name of the oldest child of the parent. What is the best way to do that?
Solved! Go to Solution.
@dheerajnagpal wrote:
I want to populate the parent.oldest_child with the name of the oldest child of the parent.
ANY(ORDERBY([Related Childs], [age], true))
Here's one way to get the key of the row from the Child table:
MAXROW("Child", [age], IN([Child key column], [_THISROW].[Related Childs]))
If the [Oldest_Child] column is a Ref type that references the Child table and the Child table's label column is [Name], then the name will display in the app UI. If not, you can use the expression result within a LOOKUP function to return the value from the [Name] column.
@dheerajnagpal wrote:
I want to populate the parent.oldest_child with the name of the oldest child of the parent.
ANY(ORDERBY([Related Childs], [age], true))
I used TOP instead of any and was able to get the UID of the related child.
But when I am trying to use select to choose the name of the child, it becomes blank.
User | Count |
---|---|
19 | |
10 | |
7 | |
5 | |
5 |