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 / Update a value in one ...
Power Apps
Answered

Update a value in one SharePoint list when a record is created in another Sharepoint list using PowerApps

(0) ShareShare
ReportReport
Posted on by 32

I have two data sources:

 

AccidentReport = this is a new form and is completed whenever someone has an accident at work. One of the columns in this data source is called “BeenInvestigated”, which is set to false by default.

InvestigateReport = This is a new form and is completed whenever an Investigator decides to looks into the submitted accidents from the AccidentReport list.

 

When an accident has been reported, it appears in this dropdown to be investigated:

 

capture-1.png

This is the dropdown’s items property:

 

capture-2.png

I would like to know how to remove the AccidentID from this dropdown, as soon as the InvestigateReport form has been submitted. For example, if AccidentID 38 has been investigated and sent to InvestigateReport as a new entry, I would like 38 to disappear from this dropdown.

 

It would be great if I could update BeenInvestigated in the AccidentReport to true for that record when the corresponding InvestigateReport form has been submitted, but if there is a better way to do this, I’d be happy to hear about it.

Categories:
  • cds Profile Picture
    1,001 on at

    You will want to use Patch function. I recommend Shane Young 

  • VINdicated09 Profile Picture
    32 on at

    I have already used Patch and have followed along with his video. Though I was able to get it to work, my solution isn't great. Below, you can see that my submit button, is actually within a gallery, with all the other elements in that gallery set to visible=false! 

     

    capture-3.png

    Is there a better way to do this or a way where I can have this button outside of the gallery?

  • VINdicated09 Profile Picture
    32 on at

     Can someone please help rather than just telling me to search for a video

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @VINdicated09 :

    I suggest you add a formula after SubmitForm().

     

    Patch(AccidentReport,
     LookUp((AccidentReport,AddidentID=dropdown.Selected.AccidentID),/*Find the corresponding record in AccidentReport*/
     {BeenSubmitted:true})/*Update the value of BeenSubmitted to true*/

     

    Because the value of BeenSubmitted for the specified record is no longer false, this option will no longer appear according to the filter conditions in dropdown.

    Best Regards,

    Bof

  • cds Profile Picture
    1,001 on at

    Move your patch and navigate to onsuccess of the form. 

    I would set(JustSubmitted, ThisItem) so you can call it easily. 

    After rereading this: __I would like to know how to remove the AccidentID from this dropdown, as soon as the InvestigateReport form has been submitted. For example, if AccidentID 38 has been investigated and sent to InvestigateReport as a new entry, I would like 38 to disappear from this dropdown.

     

    If patch is working properly, you just need to refresh the dropdown datasource.

  • VINdicated09 Profile Picture
    32 on at

    Thank you so much. This has worked for me.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard