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 / patch function within ...
Power Apps
Answered

patch function within forAll

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

hello, 

i need you help 

 

i have list of value in my power app , and i want to update all data with  the same reference , 

exemple : 
name =  hotdog  

when i update the name into : hotdogs

i want all my data in sharepoint with hotdog as name, to update into hotdogs with "s" 

 

i found this post, it is exactly what i want , but it dones not working for me 

posted already from someone 

 

i tried a lot but face issue from my code , that argument are not valid for both filter function and forAll function 

do you have an idea why ??

 

 

this is my code 

 

 

Set(previousName ; DataCardValue2.Text)&
// SubmitForm(Form_test)&
// ClearCollect(FilterRecord; Filter('company sharepoint list'; Company_app = previousName )) &
ForAll(
Filter('company sharepoint list'; Company_app = previousName);
Patch(
'company sharepoint list';
ThisRecord;
{ Company_app: DataCardValue2.Text }
)
)

 

thank you ,

 

 

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,732 Most Valuable Professional on at

    Hi @Anonymous ,

    You are using the same value (DataCardValue2) for the old and new names, so you need another control for one of them, but this should work

    UpdateIf(
     Filter(
     'company sharepoint list'; 
     Company_app = YourPreviousNameControl.Text
     ),
     {Company_app: YourNewNameControl.Text}
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hi @WarrenBelz ,

     

    thank you for the quick answer , 

     

    what you give woks really good, i did just a litlle change , i split filter function , because, updateIf is waiting for 3 arguments (source , condition, element).

     

    but please, 2 questions :

    1 - within the doc, updateIf has delegation issue , it means it will update only up to 2000 rows , is that correct ?? , 

    (allthough the function till now is not uderlying with blue line ) then prehaps it is ok 

    2 -  do you know why my patch function face always the issue "agument not valid...it expected text, tabular...."

    thank you , 

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

    Hi @Anonymous ,

    ForAll also is limited by Delegation, however recent improvements in UpdateIf suggest that this limitation may not be there. The main issue with your code is that you cannot reference a List to patch itself.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard