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 / PowerApps - issue with...
Power Apps
Unanswered

PowerApps - issue with LookUp function

(0) ShareShare
ReportReport
Posted on by 23

Hi all, I have an issue with LookUp() function used in ForAll().
Currently I obtain the following result:

Sergii24_1-1706175974495.png


Instead, the expected result is:
A - A1
B - B1


Am I doing something wrong?

Please copy-paste the code below to a new button to test it:

 

ClearCollect(
 _col_ItemsToSearch,
 {
 lookup_name: "AP-24",
 result_name: "A"
 },
 {
 lookup_name: "AP-23",
 result_name: "B"
 }
);

ClearCollect(
 _col_WhereToSearch,
 {
 lookup_name: "AP-24",
 result_name: "A1"
 },
 {
 lookup_name: "AP-23",
 result_name: "B1"
 }
);

ClearCollect( 
 _test,
 ForAll(
 _col_ItemsToSearch,
 ThisRecord.result_name & " - " & LookUp( _col_WhereToSearch, lookup_name = ThisRecord.lookup_name, result_name )
 )
)

 

 
Thank you!

Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @Sergii24 

     

    please try this version:

     

    ClearCollect(
     _col_ItemsToSearch,
     { lookup_name: "AP-24", result_name: "A" },
     { lookup_name: "AP-23", result_name: "B" }
    );
    
    ClearCollect(
     _col_WhereToSearch,
     { lookup_name: "AP-24", result_name: "A1" },
     { lookup_name: "AP-23", result_name: "B1" }
    );
    
    ClearCollect(
     _test,
     ForAll(
     _col_ItemsToSearch,
     Let(
     varCurrentRecord,
     ThisRecord,
     varLookupResult,
     LookUp(_col_WhereToSearch, lookup_name = varCurrentRecord.lookup_name),
     If(
     !IsBlank(varLookupResult),
     varCurrentRecord.result_name & " - " & varLookupResult.result_name,
     varCurrentRecord.result_name & " - Not Found"
     )
     )
     )
    );

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • SZ-23070748-0 Profile Picture
    23 on at

    There are following errors:

    Sergii24_0-1706177070357.png


    It seems that use of Let() within ForAll() is incorrect...

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard