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 related items i...
Power Apps
Unanswered

Update related items in SharePoint list

(0) ShareShare
ReportReport
Posted on by 4

Hi,

I need some help updating releated items in a SharePoint list using a collection.

I have some records that were created and are related by using the same name id stored in a column. I need to find a way when a user selects one of the item for edit. That the other items related to that item get also updated. This can apply to recurrance bookings. 

Example

Item 1 - Main ID

Item 2 - has Main ID of Item 1

Item 3 -  has Main ID of Item 1

 

Thank you

Categories:
  • CU18061035-1 Profile Picture
    Microsoft Employee on at

    Hi @LAIRZ 

     

    Take a look at the UpdateIf function:

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-update-updateif

    Something like:

     

    UpdateIf( YourDataSource, MainIDField = YourFormName.LastSubmit.ID , { MyField1: YourFormName.LastSubmit.MyField1 } )

     

     

    You would put this in the OnSuccess of the Form being submitted.

     

    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up.

    Thanks.

    -Mark

  • jrletner Profile Picture
    720 Moderator on at

    Hi @LAIRZ ,

     

    Here is an example I put together. 

    jrletner_0-1706124164227.png

     

    The data has an ID and an Item. I have a dropdown box that allows me to select an ID that I want to update with an input box. 

     

    In this example, every item that has an ID = 1, will be updated with "Data changed for item 1"

    jrletner_1-1706124216842.png

    The code in the Button is this:

     

    UpdateIf(colMyFormData,myID = drpMyID.Selected.Value,{item: inpMyItem.Text})

     

    This says, Update the row IF the myID is equal to the ID in the dropdown box. If they match, then update the item with the text in the input box.

     

    Hope this helps you with your question.

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

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard