Search code examples
listsharepointpower-automatepowerapps

How to update column value to same value refer another column in Sharepoint list


I have a SharePoint list called "DCE" that has two columns, one is "PO number"(Number column),

another one is "Completed"(Choice column), that has two choices for choose (Yes or No).

I want to build the flow that if "Completed" choose "Yes", another record which is same PO number also set completed as "Yes".

For example, i have set one of PO number 4500123456 record and its "Completed" change to "Yes", I want to another record which PO number is 4500123456 also change the "Completed" to "Yes"

enter image description here enter image description here

May i know how to do?

Thank you very much.


Solution

  • You can use Power Automate flow such requirements.

    Try these steps:

    1. Create a Power automate flow which will run on item creation or update
    2. Add trigger condition so that flow will run only when "Completed" is not equal to "Yes" - to avoid infinite loop cases
    3. Inside the Power automate flow, add "Get items" action with filter condition like:
    PONumber eq '<PO Number column value from trigger outputs>'
    

    Where:

    • PONumber is internal name of your column. You can get the internal name of your SharePoint list columns by following this article: How to find the Internal name of columns in SharePoint Online?
    • Replace <PO Number column value from trigger outputs> with actual output from trigger. Which will be something like: triggerOutputs()['body/PONumber']
    1. Add apply to each action and use value output of "Get items" action as input to apply to each to loop on it
    2. Add "Update item" action inside apply to each action
    3. Select the site address and list name and set ID property of "Update item" action to item()['ID']
    4. Update list items to set "Completed" to "Yes".