I'll try and make this is as clear as I can:
1) I have a Gallery that filters Users entity in dataverse. When you select one of these it gets added to a collection: let's call it colSelectedUsers.
2) My Users entity has a many to many relationship with a custom entity: let's call it cz_myentity.
3) I want to relate the selected users that are in the collection colSelectedUsers with a specific record in cz_myentity.
4) The record for cz_myentity is created in my app in an EditForm using the SubmitForm function.
5) The OnSuccess should then relate my selected users.
6) The formula I currently have is:
ForAll(colSelectedUsers, Relate(LookUp(Users, User = ThisRecord.User).'My Entities (cz_myentity_user)', EditForm1.LastSubmit))
This doesn't work and gives me the error: "The right side of equal must be a constant value" so I try:
6a) ForAll(colSelectedUsers, Relate(LookUp(Users, 'Primary Email' = ThisRecord.'Primary Email').'My Entities (cz_myentity_user)', EditForm1.LastSubmit))
7) It almost works! It actually relates a seemingly random User record in my environment (but always the same one) and that's it...
Any help greatfully received.
Solved! Go to Solution.
Check out the News & Announcements to learn more.
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Check out our new Discover Your Career Path blog post series and get all the details.