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.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.