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 / ForAll current item co...
Power Apps
Unanswered

ForAll current item column

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I've a forall loop and I need to use the id of the current item to fullfill a column patch:

 

ForAll(
    Gallery.AllItems;

    Patch(
        Order_Articles;
        Defaults(Order_Articles);
        {
            Property:
First(
// Person.Code is empty
Filter(Person_Articles; Person_Articles[@Person].Code = Person.Code)
)
}     ) )

I'm looping objects that have Person property, but Code it's always empty (I know for sure Person is correctly selected). Maybe a "same-name" issue? I've also tried renaming the "Person" column, but with no luck. Could you please help me? Many thanks in advance.

Categories:
  • PavanKumar Profile Picture
    479 on at

    Hi,

     

    You may need to drill down the issue as below:

     

    1. Check what value code is showing

    ForAll(
     Gallery.AllItems;
    
     Collect(colCodes,Person.Code)
    )

    check what values colCodes collection is showing.

     

    2. Next check will be person codes filter

     

    ForAll(
     Gallery.AllItems;
    Collect(colPersoncodes, Filter(Person_Articles; Person_Articles[@Person].Code = Person.Code))
    )

    this may help you to come to the bottom of it.

     

     

     

    if this answers your question then mark it as verified and give it a thumbsup

    Regards,

    Pavan Kumar Garlapati

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @PavanKumar I think that my problem is that the collection is not collecting lookup fields. How can I do that?

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard