Hi, here’s to know “How can we create relationship” beetwen two SharePoint Online lists.
My idea is create relation with a list of costs rows, to my list “Travel requests”, created for previous tutorial (Build an app in a few minutes), to understand costs details for each travel 🙂
1. Create list “Expense rows”
As a first step, we need a new list to store costs rows, so I add new list to my SPO site.
Then, we should add column to store amount of cost and column to create relationship with travel rows (PS: I use Title column for title of cost row)
Ok now we must create column to create relationship beetwen cost row and travel. To do this, need a LookUp column or for Italian People (“Ricerca”). Please keep mind this kind of column doesnt’t listed on list of common type column (see previous screenshot). One way to create it: click on “Add column” , “More” .
Here we can create lookup column.
Put column name (my case “Travel”) and choose type “Lookup”… (Wait for page reload).
Now you should set “Get information from” field : In this field you must choose another list where get row (or multiple rows) to create relationship.
Set “In this column” field. Here you can set column of other list, used to choose row.
In my case I also checked “Require that this column contains information“, because , in my opinion, when we add cost rows, travel is mandatory 🙂
There are others option, but for this tutorial we can click ok, and come back to our list.
2. Show relationship in SPO Page
First, create some travel rows and cost rows. Now , when we add some cost rows, we must choose “travel” row to associate it 🙂
Now it simple 🙂 To show relationship beetwen two list, we must edit a SharePoint page, add two “list” webpart:
Select Parent list first:
And then we do same process for expense rows.
Finally we have 2 lists in page:
Finally, add Dynamic filtering on “Expense row” webpart:
Result:
Thanks and Stay tuned 🙂
This is the most great post that I have ever come across after extensive searches. Im really thankful to yourself for giving me this unique information.