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 / Lookup in ForAll refer...
Power Apps
Unanswered

Lookup in ForAll referring to first record in collection only

(0) ShareShare
ReportReport
Posted on by 17

I'm building an app using Dataverse as the source of information.  I have created a collection that captures records that has missing data and is working fine:

 

 

ClearCollect(colMissingSurveyData,AddColumns(Filter(Surveys_1,IsBlank('Client Name'.Name)),"SurveyID",ThisRecord.'Survey Name'));

 

 

Produces below collection:

cfidler72_0-1659834984424.png

I then want to use the cr500_clientcode field to create a new collection of data, which includes the Client Name.  I am trying to ascertain this using LookUp:

 

ClearCollect(colTemp, ForAll(colMissingSurveyData, {ID: SurveyID, ClientID: cr500_clientcode, Client: LookUp(Clients,'Client Code' = cr500_clientcode, Name)}))

 

 The collection is created but it is only including the Client based upon the client code of the first record:

cfidler72_1-1659835179940.png

I have seen other posts talking about using As and ThisRecord in my formula, and have tried these but with no luck.  

 

I'm sure the answer is simple, but can anyone help me with what I'm missing?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,789 Most Valuable Professional on at

    Hi @cfidler72 ,

    Try this (I am assuming the field name is correct here)

    ClearCollect(
     colTemp, 
     Ungroup(
     colMissingSurveyData,
     "ClientName"
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • cfidler72 Profile Picture
    17 on at

    Hi @WarrenBelz , unfortunately it return a collection with no records in it

  • WarrenBelz Profile Picture
    153,789 Most Valuable Professional on at

    @cfidler72 ,

    Not sure why - it works perfectly on any collection and spits the record with the table field (I assume ClientName is a Table field) into individual added fields and record. Maybe it is the Dataverse -generated structure as I have only tested it on SharePoint. Sorry, I have not further suggestions.

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
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard