cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

ForAll current item column

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.

2 REPLIES 2
Highlighted
Responsive Resident
Responsive Resident

Re: ForAll current item column

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

Highlighted
Frequent Visitor

Re: ForAll current item column

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

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,476)