Hi,
I am trying to solve this problem but not having much luck:
Table: Table1
Field: Name
Field: Weekending
Table: Table2
Field: lu_Table1 (Relationship Column)
Field: Activity
Relationship One-To-Many Table1>Table2
My app uses the current week to get a single record from Table1 and stores it in variable 'current_record' I then want a gallery to display all records from Table2 where lu_Table1 = current_record. I have tried the below but I get an Invalid Argument Type error and a Delegation warning, how should I be approaching this?
Filter(Table2, lu_Table1 = current_record)
TIA
Solved! Go to Solution.
I finally found a solution to this, for anyone else struggling, the reason its not immediately clear because the intellisense in Power Apps doesn't prompt for all the data available which includes the Unique Identifier Field.
The simple way here is to use the Unique Identifier of the record in the table via the relationship column, to do this you reference it by the name of the table as the field. See below:
Set(current_record, Lookup(Table1, Weekending = DateTime.Selected);
Filter(Table2, current_record.Table1 = lu_Table1.Table1)
so the current_record holds a single record from Table1, current_record.Table1 returns the GUID of that row. In the filter we compare that to the GUID of the relationship field in Table 2 lu_Table1.Table1.
I finally found a solution to this, for anyone else struggling, the reason its not immediately clear because the intellisense in Power Apps doesn't prompt for all the data available which includes the Unique Identifier Field.
The simple way here is to use the Unique Identifier of the record in the table via the relationship column, to do this you reference it by the name of the table as the field. See below:
Set(current_record, Lookup(Table1, Weekending = DateTime.Selected);
Filter(Table2, current_record.Table1 = lu_Table1.Table1)
so the current_record holds a single record from Table1, current_record.Table1 returns the GUID of that row. In the filter we compare that to the GUID of the relationship field in Table 2 lu_Table1.Table1.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
215 | |
211 | |
84 | |
57 | |
36 |