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 / Only one row updated f...
Power Apps
Unanswered

Only one row updated from Gallery to data-verse table (only last record of gallery updated into first matched row of table ,not all)

(0) ShareShare
ReportReport
Posted on by 6

I have tried to update all gallery records into dataverse table based on ID match but its update only last records of gallery into first matched row of table.

Code is -

ForAll(NewGal.AllItems,

Patch(ProjCost,

LookUp(ProjCost, ProjCostID=PCIDlbl.Text),

{

Currency:Input1.Text,

Expenses:Input2.Text

} ) );

Note : PCIDlbl is label outside gallery which contain ID value which we need to match with table column ProjCostID to update records.

 

I have ProjCost table which contains ProjCostID,Name,Currency ,expences  and others columns , so suppose ProjCost table has following records

ProjCostID   Name         Currency     Expenses......

1                   Name1

1                   Name2

1                   Name3 

 

Other column values we need to update by Gallery(Name : NewGal) records based on lookup ProjCostID with label id value.

 

Above code only update last record of gallery into first row of table i.e. Its update only  corresponding to 1 , Name 1

 

Kindly suggest how can i update gallery records for all table row like in above table values should be updated for (1,Name1 ),(1,Name2 ) and (1,Name3) ?

 

Kindly let me know if any input required!!

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @vkas-mshra You are Patching only one record because, u'r Lookup is finding a record that PCIDlbl.Text which is a constant value. So it will always get the same record and keep patching it!

  • vkas-mshra Profile Picture
    6 on at

    Thanks for looking into this issue...So how should I proceed to update all respective records.... I hv tried to take   PCIDlbl inside gallery n got same result...n also tried to rename column ProjCostID into PCID and in lookup use as ProjCostID=PCID but it also did not work...pls suggest .

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @vkas-mshra Once you get the PCID in to the Gallery (as part of the Items property) u'r LookUp will be,

    LookUp(ProjCost, ProjCostID=ThisRecord.PCID)

  • vkas-mshra Profile Picture
    6 on at

    Thanks, I hv tried to take label inside gallery which contains id (GalPCIDlbl),and applied suggested code but it's give err... thisRecord.galPCIDlbl is not taking...when I tried LookUp(ProjCost, ProjCostID=GalPCIDlbl.text) giving delegation warning n not worked ....pls suggest what I am doing wrong ....thnx!!

     

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @vkas-mshra could you share a screen shot for me understand your need clearly.

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

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard