1

Scenario:

I have 2 existing lists, SourceList and TargetList, using PowerAutomate, how can I manage to pull data from the SourceList when a new item is created in the TargetList.

  • The output I'm trying to achieve is similar to a vlookup function of excel.

  • In TargetList, I have a column with choices, and based on the value of this column I would like PowerAutomate to get items from the SourceList and update another column in the TargetList.

enter image description here

Would appreciate any help!

1 Answer 1

0

This might be easier and quicker to do if you customise the SharePoint list form with PowerApps.

In Power Automate, I assume you have a workflow that triggers when Target list item is created or modified. Then you need to

  • Get items -- specify the Source list

  • in the filter query, filter the SourceCategory field by the value in the current item. The query syntax is

    FieldName eq 'Value you are looking for'

so in your case it might look like this, assuming the internal field name is Category

Category eq '<pick the category field from the dynamic content>'

This will return an array of results, even if there is only one result. If you are not comfortable with writing complex formulas in Power Automate, the simplest would now be to write the TestData1 and TestData2 values from the previous step into two variables. PA will automatically generate a loop and do that step for each returned record from the SourceList, but that's fine if there is only one result.

Next, Update Item, specify the Target List and the ID of the current item from the trigger body and set the category field from the value in the variable.

1
  • Hi teylyn, thanks for the answer, will give it a try. Commented Dec 11, 2024 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.