Thank you Wearsky. Made some progress on this but landed on another issue. My backend is dataverse. I am currently blocked on this particular issue. I am inserted selected records from a gallery based on oncheck of a checkbox to selectedActivities2 collection, which is working fine. On click of a button, I wrote this formula that should insert record to sup table with selected activity in a lookup column. The code works fine when the name is hardcoded, and the new record in sup table shows 'Activity1' value in lookup column, but the same does not work when I replace the hardcoded value with the collection field 'ActivityName'. I tried with Lookup, Filter, but nothing works. Desperately looking for help on this, if someone can kindly resolve this for me
ForAll(selectedActivities2,
Patch(Sup,
Defaults(Sup),
{
//ActivityId:LookUp(MyActivities,Name="Activity1"),
ActivityId:First(Filter(MyActivities,Name=ActivityName))