0

I'm new to SharePoint and I'm having trouble understanding how to do something that seems simple.

I have a list People and a list Rooms.
People has columns LastName, FirstName, and Room.
Rooms has columns Number, Space Type, and Occupant. Occupant is a lookup for LastName in People.

I would like SharePoint to auto-populate the Room column in People when Occupant is updated in Rooms. For example, if I enter Doe in Occupant for room number 1, People should show that Doe is in Room 1.

I tried making Room in People a lookup, but that had no effect. I also tried following this question, but nothing happened (not sure if I did it correctly) and read other questions, including this one and others mentioning workflows and events, but I don't know how that would work or how they are implemented. I think I'm using SharePoint 2010 online, but apparently there's no way to find the version?

Is there a way to update one list based on another?

3 Answers 3

1

if you are using SharePoint online (i.e. if your site URL contains ".sharepoint.com"), then you can use Flows. Please check if you have an option to create flow from the top of your list command bar.

enter image description here

Please check the following tutorial which describes the steps:

Update a secondary SharePoint list using Flow

1

Just now answered similar question, looks like you also have same option.

No direct way to do this, you would need customization. Below are some high level techniques to achieve same.

Using MSFlow - What you need to do is create a flow for your Occupant list when a item is created/updated. In Flow add logic to query list item from People list from based on your column(may be LastName column) which is holding relation ship between this 2 list. Update People list Room column with room value of current item on which flow is running. Below link will help you get direction on how flow logic should be. https://powerusers.microsoft.com/t5/Building-Flows/How-to-update-an-item-in-a-SharePoint-list-base-on-the-changes/m-p/101738#M9942

Using Remote event receiver - as you are on SharePoint online you would need to create remote event receiver. Remote event receiver would trigger on you invoice list and you can use CSOM to get/update data in SharePoint list by using same calculation as above Ref link - https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/create-a-remote-event-receiver-in-sharepoint-add-ins

Customize your invoice list add/update form using content editor web part and use JSOM to get/update data. How to trigger the click event of the SharePoint OOTB list's new form Save button?

Use custom forms to add/update data in Invoice list, use JSOM and perfrom crud operation based to both list accordingly.

Use PowerApps forms to customize Invoice list and create datasource to budget list, keep a control hidden to user point to balance column in Budget list, write rules to calculate balance - I am not sure how this will work but might be an option.

Feel free to comment if you need more details.

Hope this helps...Happy Coding!!!

0

You could use “Update List Item” action to update value based on “Rooms” list. enter image description here And you can run this workflow when item is changed.

About how to create a workflow, you can refer to it.

5
  • Where do I find "Update List Item" action? Is that in a workflow? I've never made a workflow before.
    – Evan
    Commented May 2, 2019 at 18:22
  • 1
    yes, it is in a SharePoint Designer workflow, I have edited my answer to contain a image and a link to how to create a workflow, you can refer to them
    – Kally
    Commented May 3, 2019 at 1:44
  • I was finally able to install Designer and created a workflow like you described. I tried running it, but it says Internal Status: Suspended: RequestorId: 7a75a792-2729-6764-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.FormatException: Input string was not in a correct format. Any idea what that means or how to resolve it?
    – Evan
    Commented May 6, 2019 at 21:34
  • What did you mean by running? Publish? you can check if there are some wrong strings as the error message in your workflow, you can click "Check for Errors" button to check that.
    – Kally
    Commented May 7, 2019 at 9:08
  • Sorry, by "running" I meant updating the list (which triggered the flow). I think maybe it has to do with a lookup field? The error message is very unclear as to which part of the flow is causing the error.
    – Evan
    Commented May 7, 2019 at 17:13

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.