Hello everyone,
I have two Common Data Service (CDS) tables Tray and Plant respectively. Currently in my solution Tray table is displayed in a gallery. When I select an item in this gallery (Gallery.Selected.Name) I want to check how many of the records in the Plants table have the same value (for column Plants.TrayName) as the one that's selected in the gallery. Then for all the records that have Gallery.Selected.Name = Plants.TrayName I want to add these records to a new collection.
So far I've tried ForAll(Plants, If(Gallery1.Selected.Name in Plants.TrayName, <action where this row is added to a collection>)) but this gives me error "Invalid schema, expected one-column table" that points to Plants.TrayName.
Any suggestions?
Solved! Go to Solution.
Hi @ManfredsMertens ,
This will collect one field - just add the others as required
ForAll
Filter(
Plants,
TrayName = Gallery1.Selected.Name
),
Collect(
YourCollection,
{Tray:TrayName}
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @ManfredsMertens ,
This will collect one field - just add the others as required
ForAll
Filter(
Plants,
TrayName = Gallery1.Selected.Name
),
Collect(
YourCollection,
{Tray:TrayName}
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Thanks bro!
I just noticed that this code doesn't import it in the right order. Lets say I have 4 records. By looking at the ID of the new collection it gets imported 1,2,4,3. Any idea why?
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
204 | |
187 | |
70 | |
39 | |
34 |
User | Count |
---|---|
349 | |
269 | |
122 | |
78 | |
61 |