AlHal
AlHal

Reputation: 397

Sharepoint update field based on lookup

I have a Sharepoint online list "myList" with fields PersonName, OriginCountry and OriginCity and another list of countries and cities called "WorldList" with columns Country and City. In myList the user will select their city using a lookup to Worldlist. I want the country field to update based on what is entered into the city field. What's the best way to do this? I would like to do this without a webPart, Powerapp or Flow, but will use them if necessary. I would prefer to use a Flow rather than a Powerapp or webpart.

Upvotes: 0

Views: 1243

Answers (1)

Julie_MSFT
Julie_MSFT

Reputation: 411

When you set the OriginCity lookup column in myList from WorldList, please add an additional column country as shown below:

enter image description here

If you don’t want to show the additional column in list view, you can hide the column.

Then create a flow to update the OriginCountry value using the additional column "OriginCity:Country":

enter image description here

Simple test for your reference:

enter image description here

-------------------------Update----------------------------------

Note, exclude OriginCountry ID, other columns will use the property under "when you created or modified the item" option.

enter image description here

Upvotes: 1

Related Questions