web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Look up another table ...
Power Apps
Answered

Look up another table in a ForAll

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

Probably an easy one but I'm stuck. Hopefully someone can help please.

 

I have a button which will create a number of different Planner tasks. The OnSelect formula is:

 

ForAll(Tasks,Planner.CreateTaskV2(OPGplanId,TaskTitle,{bucketId:TestbucketId,dueDateTime:DatePicker1.SelectedDate+TaskAddDays,assignments: LookUp(Roles, EmployeeRole = TaskAssignedTo, EmployeeId)}))

 

All is working fine, except the 'assignments' part - I don't think I'm quite getting my head around the LookUp. I am trying to find the id for the assignments on another table that lists all the roles.

 

My 'Tasks' table looks like:

Task TitleTaskAddDaysTaskAssignedTo
Test task 11Head of Shared Services
Test task 22Head of Customer Services
Test task 33PRO

 

My 'Roles' table looks like:

EmployeeRoleEmployeeId
Head of Shared Servicesone@sample.com
Head of Customer Servicestwo@sample.com
PROthree@sample.com

 

Can anyone help please?

 

Thanks!

 

Categories:
I have the same question (0)
  • Verified answer
    wyotim Profile Picture
    2,545 on at

    Hey @Anonymous, try this:

    ForAll(
     Tasks,
     Planner.CreateTaskV2(
     OPGplanId,
     TaskTitle, 
     {
     bucketId: TestbucketId,
     dueDateTime: DatePicker1.SelectedDate + TaskAddDays,
     assignments: LookUp(Roles, EmployeeRole = Tasks[@TaskAssignedTo], EmployeeId)
     }
     )
    )

    These nested operations can be tricky to sort out but my guess is that using the disambiguation operator should help the LookUp to operate in the correct scope. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Thank you, @wyotim, for the fix and for the link. I'll go do some reading!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard