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 does not work p...
Power Apps
Answered

ForAll does not work properly.

(0) ShareShare
ReportReport
Posted on by 22

Hi everyone,

 

I am creating a work order for the logistics department, the codes I wrote are below. These codes were working properly but not they don't.

 

First I created the collection for the toggle tool, with this transition one or more rows can be selected. After selecting one or more rows, the corresponding columns become "true" in the collection.

 

Then, after clicking the "create work order" button, the rows controlled by toggle in sql db become "true".

These codes were working fine before. But now it is not working properly. That is, after clicking the "create work order" button. The value of each row does not convert to the "true " value. Some values become true but some do not.

 

I couldn't find a way to fix it.

 

Thanks in advance to all of you.

 

aytactaskiran_0-1648901104892.png

 

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

    Hi @aytactaskiran ,

    You can improve the efficiency of your code speed-wise as below (Patch the table instead of looping through it)

    With(
     {
     wList:
     Filter(
     isEmri01ustur4;
     malSecim
     )
     };
     Patch(
     MEksikMalzeme;
     ForAll(
     wList As aPatch;
     {makineSase: aPatch.makineSase}; 
     {
     drm: true; 
     isemriOlusturmaTarihi: Now()
     }
     )
     )
    );;

    but are you saying the field drm in MEksikMalzeme is not being changed to true?

     

    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

  • aytactaskiran Profile Picture
    22 on at

    Hi @WarrenBelz

     

    Thank you for your reply, I will use your method.

     

    But as you mentioned, field drm is not changed to true.

    I have more than one record which has same "makineSase" I want to change all of them to true value. But only first record is changed to true value

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @aytactaskiran ,

    That is strange - if you put this on a button

    ClearCollect(
     colTest,
     Filter(
     isEmri01ustur4;
     malSecim
     )
    )

    then View > Collections > colTest, do you see the records (the first 5 at least) you want updated?

  • aytactaskiran Profile Picture
    22 on at

    Hi @WarrenBelz,

     

    Yes I can see the records. But It is not changed to true after run codes above. If you want to see them I can send screenshots 

  • Verified answer
    WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    @aytactaskiran ,

    Is makineSase a unique identifier for the record ? If not try this

    With(
     {
     wList:
     Filter(
     isEmri01ustur4;
     malSecim
     )
     };
     ForAll(
     wList As aUpdate;
     UpdateIf(
     MEksikMalzeme;
     makineSase = aUpdate.makineSase; 
     {
     drm: true; 
     isemriOlusturmaTarihi: Now()
     } 
     )
     )
    );;

     

    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

     

     

  • aytactaskiran Profile Picture
    22 on at

    Thank you very much @WarrenBelz  🙂

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard