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 data to sharepoint
Power Apps
Answered

Patch data to sharepoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

I am trying to build application where i can patch data from Powerapps to sharepoint on job progress.

Any help is highly appreciated.

 

The application intention is very simple to make a production output entries, when we register 1st time a batch no, product,equipment ,process with start time - it creates a new registry. then when we patch again, it finds the previous start registry and enters the finish time.

and to create multiple registry for the same process the same day.  

Can you suggest me what should i improve in my formula? to get such result.

Any help is highly appreciated.

2.JPG

 

1.JPG

Start & Finish time in PowerApps has this code on text filter 

glbR.Start

glbR.Finish

Button onselect property was this

With({dataItem: // Your Record
 LookUp(SortByColumns(Test_MDP, "Start", Descending), 
 Product = Process_dropdown.Selected.Value && 
 Equipment= Equipment_dropdown.SelectedText.Value &&
 Process = Process_dropdown.SelectedText.Value &&
 Batchno = Batchno_Textinput.Text
 )},
 With({newTrue: // Your criteria for a new record
 (IsBlank(dataItem.Start) && IsBlank(dataItem.Finish)) || 
 (!IsBlank(dataItem.Start) && !IsBlank(dataItem.Finish))
 },

 // Your Patch to the DataSource
 Set(glbR,
 Patch(Test_MDP,
 If(newTrue, Defaults(Test_MDP), dataItem),
 Patch(
 { Product = Process_dropdown.Selected.Value,
 Equipment = Equipment_dropdown.SelectedText.Value,
 Process = Process_dropdown.SelectedText.Value,
 Batchno = Batchno_Textinput.Text
 },
 If(newTrue, {Start:Now()}, {Finish:Now()})
 )
 )
 )
 ) 
)

but its showing me a lot of error on this program

 

3.JPG

Categories:
I have the same question (0)
  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Anonymous ,

    gabibalaban_0-1632292622419.png

    The second Patch() shouldn't be there and use ":" instead of "=" inside the record to be patch { .... }.

    Give it a try ...

     

    Also we should check the error on Start Time and End Time. Can you give some screenshots with the errors. 

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @gabibalaban ,

     

    Many thanks for your suggestions. It works great now!

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

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard