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 / Concurrent error - inv...
Power Apps
Answered

Concurrent error - invalid arguments

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to cut down my 10+ second startup time every time I open this app by adding a Concurrent function to my OnStart, but I can't get past this error and have only found the documentation here and it's not any help. 

 

Set(PassedCustomer, Param("customer"));

Concurrent(
ClearCollect(Employee, First(Office365Users.SearchUser({searchTerm: PassedCustomer}))),
ClearCollect(Manager, Office365Users.Manager(First(Employee).Id))
);

I only have these two lines in there right now, but I get "The function 'Concurrent' has some invalid arguments".

 

And if any one has any other suggestions on how to speed up an app embedded in Dynamics 365 page it would be greatly appreciated.

concurrent.PNG
Categories:
  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at

    The result of the first expression in the Concurrent function is used in the second one, so you cannot use them concurrently:

    Concurrent(
     ClearCollect(Employee, First(Office365Users.SearchUser({searchTerm: PassedCustomer}))),
     ClearCollect(Manager, Office365Users.Manager(First(Employee).Id))
    );

    When creating the Manager collection, it uses the first element of the Employee collection - so it first needs to wait until the first expression is complete (to populate the Employee collection) before it can take the first element of it. That's why those expressions cannot be run concurrently.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard