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 / Adding new line to Gal...
Power Apps
Unanswered

Adding new line to Gallery Patch

(0) ShareShare
ReportReport
Posted on by 185

Hi all,

When adding a new line I see that it has to use the patch function and actually add the new row to the data source and then display it in Power Apps. Is there a way to add a new line (only in Power Apps) and then only Patch to the source after explicitly saving?

 

Right now I'm using:

 

Patch(
 'URL List',
 Defaults('URL List'),
 {Title: "New URL"}
);
Set(varReset,false);
Set(varReset,true);

 

I'm guessing it would need to be loaded into a collection and then patching the collection to the data source? I did try that in one of Reza's guides but it didn't work for me.

 

Thanks,
David

Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @da1vea 

    According to your description, you want to first save the data in a collection and then patch to the data source.

    You can refer to this :

    ClearCollect(MyCollect , Defaults('URL List') );
    Collect(MyCollect , {Title : "New URL" });
    Collect(MyCollect , {Title : "New URL2" });
    Set(MyCollect2 ,  Filter (MyCollect ,Title<> Blank()) );
    Patch('URL List' , MyCollect2 )
     
    The result is as follows in SharePoint list:
    vyueyunmsft_0-1713942868989.png

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard