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 on Data Table Se...
Power Apps
Answered

Patch on Data Table Selected Item with Combined Data

(0) ShareShare
ReportReport
Posted on by 9

Hello,

 

I have a canvas app with a data table. Data table’s data source is a CombinedData which is collected at the OnStart of the App, via ClearCollect of three separate but identical (columns etc) SharePoint lists. Everything works perfectly. When I try to use PATCH function to update a new text entered in a text box back to original data source (sharepoint list) i am having trouble. Here is the formula AI created. Technically, this looks like in line of what I need, but it does not work. This will give you idea of what I am trying to do. Basically, when a user selects a row on the data table, add a value to a TextInput box, click on this new button, I want that value to be posted to the hard coded column of the row. Again, formula shall tell you what I aim to do. Any help is appreciated.

If(
  CPTS_Dashboard_Table1.Selected[@SourceList] = "Tracker_PKA",
  Patch(
     Tracker_PKA,
     LookUp(Tracker_PKA, ID = CPTS_Dashboard_Table1.Selected.ID),
     { PRNumber: Text(TextInput1.Text) }
  ),
  CPTS_Dashboard_Table1.Selected[@SourceList] = "Tracker_PKB",
  Patch(
     Tracker_PKB,
     LookUp(Tracker_PKB, ID = CPTS_Dashboard_Table1.Selected.ID),
     { PRNumber: Text(TextInput1.Text) }
  ),
  CPTS_Dashboard_Table1.Selected[@SourceList] = "Tracker_PKC",
  Patch(
     Tracker_PKC,
     LookUp(Tracker_PKC, ID = CPTS_Dashboard_Table1.Selected.ID),
     { PRNumber: Text(TextInput1.Text) }
  )
);
Refresh(Tracker_PKA);
Refresh(Tracker_PKB);
Refresh(Tracker_PKC)

 

Categories:
I have the same question (0)
  • Verified answer
    Ardak Profile Picture
    9 on at

    I solved it, this formula may help others

     

    Switch(
      Left(Mid(RO_Dashboard_Table1.Selected.'{Path}', Len("Lists/")+1), Len(Mid(RO_Dashboard_Table1.Selected.'{Path}', Len("Lists/")+1))-1),
      "Tracker_PKA",
      Patch(Tracker_PKA, LookUp(Tracker_PKA, ID = RO_Dashboard_Table1.Selected.ID), { PRNumber: Text(TextInput3.Text) }),
      "Tracker_PKB",
      Patch(Tracker_PKB, LookUp(Tracker_PKB, ID = RO_Dashboard_Table1.Selected.ID), { PRNumber: Text(TextInput3.Text) }),
      "Tracker_PKC",
      Patch(Tracker_PKC, LookUp(Tracker_PKC, ID = RO_Dashboard_Table1.Selected.ID), { PRNumber: Text(TextInput3.Text) })
    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard