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 collection to sh...
Power Apps
Unanswered

Patch collection to sharepoint list

(0) ShareShare
ReportReport
Posted on by 29

Hello all, 

can you please help me.. I want to patch all my collection from gallery to sharepoint list.. but if I have more than one item.. its duplicated just first one .. in picture you can see.. 

my code:

 

Patch(INV_UdrzbaTrim,
ForAll(Gallery1.AllItems,
{
Title: Text(Label10_9.Text),
PopisMat: Text(Label10_1.Text),
DatCas: DateValue(Label10_4.Text),
Spracoval: Text(Label10_5.Text),
SkladovaLok: Text(Label10_2.Text),
UloznyBox: Text(Label10_3.Text),
InvStav: Value(Label10_7.Text),
AktStav: Value(Label10_6.Text),
Rozdiel: Value(Label10_8.Text)
}));
Clear(InvTRIM);

 

1picture - collection

2picture - gallery

3picture - sharepoint list

Ivet___0-1694422460423.png

Ivet___1-1694422487535.png

Ivet___2-1694422535228.png

 

 

Categories:
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Instead of using the "lables", why don't you use the fields from the collection? I mean, use the field that you show in the label

  • jadhav_ravi_oo7 Profile Picture
    276 on at

    Hii @Ivet__ ,

    you patching the gallery's single filed only you have to use the record value in gallery

    use below formula-

     


    ForAll(Gallery1.AllItems,Patch(INV_UdrzbaTrim,default(INV_UdrzbaTrim),
    {
    Title: Thisrecord.Title,
    PopisMat: Thisrecord.PopisMat,
    .

    .

    .

    }));
    Clear(InvTRIM);

  • Ivet__ Profile Picture
    29 on at

    I tried with fields from the collection but it got an error, I couldn't solve it, so I'm trying this way.

  • Ivet__ Profile Picture
    29 on at

    Hello @jadhav_ravi_oo7 , thank you, it works but only for Title, I dont know why but when I add other fields immediately appear a error. 

     

    ForAll(Gallery1.AllItems,Patch(INV_UdrzbaTrim,Defaults(INV_UdrzbaTrim),
    {
    Title:ThisRecord.Title
    }))

  • jadhav_ravi_oo7 Profile Picture
    276 on at

    can you show the error message ?

  • Ivet__ Profile Picture
    29 on at

    hello @jadhav_ravi_oo7 ,

    its format problem its find text format but i changed date and number .. datetime format and number format.

    Ivet___0-1694508084321.png

    Ivet___1-1694508118574.png

     

  • jadhav_ravi_oo7 Profile Picture
    276 on at

    can you check this

    ForAll(Gallery1.AllItems,Patch(INV_UdrzbaTrim,Defaults(INV_UdrzbaTrim),
    {
    Title:ThisRecord.Title,

    PopisMat: Text(Label10_1.Text),

    DatCas: DateValue(Label10_4.Text),
    Spracoval: Text(Label10_5.Text),
    SkladovaLok: Text(Label10_2.Text),
    UloznyBox: Text(Label10_3.Text),
    InvStav: Value(Label10_7.Text),
    AktStav: Value(Label10_6.Text),
    Rozdiel: Value(Label10_8.Text)

    }))    or 

     

    ForAll(collectionname,Patch(INV_UdrzbaTrim,Defaults(INV_UdrzbaTrim),
    {
    Title:ThisRecord.Title,

    PopisMat: ThisRecord.columnnameofCollection,

    }))    or 

     

     

  • Ivet__ Profile Picture
    29 on at

    ForAll(Gallery1.AllItems,Patch(INV_UdrzbaTrim,Defaults(INV_UdrzbaTrim),
    {
    Title:ThisRecord.Title,
    PopisMat:ThisRecord.PopisMat,
    SkladovaLok:ThisRecord.SkladovaLok,
    UloznyBox:ThisRecord.UloznyBox,
    Spracoval:ThisRecord.Spracoval,
    DatCas: DateValue(Label10_4.Text),
    InvStav: Value(TextInput16.Text),
    AktStav: Value(TextInput16_1.Text),
    Rozdiel: Value(TextInput16_2.Text)
    }))

     

    This resolved format problem but again duplicated a first item.

     



     

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard