cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MrDzem
New Member

Referencing ForAll ThisRecord.Result within Sum and LookUp function

Could anyone help me finding a solution to the problem in a title? Here is a part of code I'm working on. I have no idea why it work in the example marked with yellow and not in cases marked with red.

Thank you in advance for all the helpZrzut ekranu 2021-07-28 170206.png

1 ACCEPTED SOLUTION

Accepted Solutions
GarethPrisk
Resident Rockstar
Resident Rockstar

Us the "As" operator to disambiguate your loops. Since you have nested loops, the ThisRecord will only reference the inner-most loop.

https://powerapps.microsoft.com/en-us/blog/formulas-thisrecord-as-and-sequence/

 

View solution in original post

3 REPLIES 3
MrDzem
New Member

If I try doing it within one loop the result is the same. I split it trying to look for solutions

GarethPrisk
Resident Rockstar
Resident Rockstar

Us the "As" operator to disambiguate your loops. Since you have nested loops, the ThisRecord will only reference the inner-most loop.

https://powerapps.microsoft.com/en-us/blog/formulas-thisrecord-as-and-sequence/

 

MrDzem
New Member

Thank you so much, it did the job! So simple...

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,458)