cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to bind two or more lists in SharePoint

Hello everyone,

 

I have a question about SharePoint. 

Is it possible to bind two or more lists in SharePoint and use them together?

For example I have two lists in SharePoint and first list has information about persons and second list has goals which have to be done.

And now I can see a person on the first list and I can choose a goal from another goal's list for this person, what have to be completed. 

Could someone tell me whether it is possible?

 

Regards 

1 ACCEPTED SOLUTION

Accepted Solutions
JR-BejeweledOne
Super User
Super User

Here is what I would do.

 

In your OnApp Start, create 2 collections, 1 from the Person information list and one from the task list.

 

Have 2 galleries.

 

In the first gallery Items property put your Person Information Collection.   In the second gallery put your tasks collection.    I don't know if there are different tasks for each user, so you might have to filter the tasks to only show the ones that apply to the specific user.

 

In Gallery 1, set the OnSelect property of your icon to Set(varRecord, ThisItem).    This is going to give us some information to use when the tasks are saved.

 

Set the Second Gallery to the Title layout.   Add a checkbox input and delete the other label.   Select the Checkbox control and set it's items to the column that contains the task name.

 

This would look something like this:

 

Checkboxtext.png

 

In the image below #1 shows what it would look like when applying the formula shown above to the Text property of the checkbox.    You can delete the 2nd gallery arrow icon shown at number #2,

 

Gallery 2 ExampleGallery 2 Example

 

If necessary in your Gallery 2 Items filter so only tasks that apply to the selected person show up. 

 

In your gallery 2 in the OnCheck property of the checkbox set a formula like this:

 

Collect(CollectionName, ThisItem)

 

In the OnUncheck Property set this:

 

Remove(CollectionName, ThisItem)

 

When you are finished, in your save button/icon in the OnSelect, you will add this information to the person list.

 

I don't know what type of column you have that will hold the tasks, but if you are going to use a single line of text field you would do something like this:

 

UpdateIf(

    PersonListDataSource, varRecordID = ID,

    {

       TaskColumn: Match(Concat(CollectionName, ColumnName & ", "),"^(?<trim>.*), $").trim

 

  }

 

)

 

 

 

 

 

 

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

4 REPLIES 4
JR-BejeweledOne
Super User
Super User

Yes you can do it.   What do you want it to look like?   There are a number of options.

 

Do you want to work with a single person at a time or do you want to have a 'list' of persons and select the one you want to work with?  

 

Will the selected goals be saved back to the list that has the persons information?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
Anonymous
Not applicable

Thank you for your answer, 

 

I want to see it works: I choose one person and I can add to this person some tasks (for example for one week), this tasks should be saved on the persons list. And all tasks which have to be done, they are on another list in SharePoint.

JR-BejeweledOne
Super User
Super User

Here is what I would do.

 

In your OnApp Start, create 2 collections, 1 from the Person information list and one from the task list.

 

Have 2 galleries.

 

In the first gallery Items property put your Person Information Collection.   In the second gallery put your tasks collection.    I don't know if there are different tasks for each user, so you might have to filter the tasks to only show the ones that apply to the specific user.

 

In Gallery 1, set the OnSelect property of your icon to Set(varRecord, ThisItem).    This is going to give us some information to use when the tasks are saved.

 

Set the Second Gallery to the Title layout.   Add a checkbox input and delete the other label.   Select the Checkbox control and set it's items to the column that contains the task name.

 

This would look something like this:

 

Checkboxtext.png

 

In the image below #1 shows what it would look like when applying the formula shown above to the Text property of the checkbox.    You can delete the 2nd gallery arrow icon shown at number #2,

 

Gallery 2 ExampleGallery 2 Example

 

If necessary in your Gallery 2 Items filter so only tasks that apply to the selected person show up. 

 

In your gallery 2 in the OnCheck property of the checkbox set a formula like this:

 

Collect(CollectionName, ThisItem)

 

In the OnUncheck Property set this:

 

Remove(CollectionName, ThisItem)

 

When you are finished, in your save button/icon in the OnSelect, you will add this information to the person list.

 

I don't know what type of column you have that will hold the tasks, but if you are going to use a single line of text field you would do something like this:

 

UpdateIf(

    PersonListDataSource, varRecordID = ID,

    {

       TaskColumn: Match(Concat(CollectionName, ColumnName & ", "),"^(?<trim>.*), $").trim

 

  }

 

)

 

 

 

 

 

 

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

Anonymous
Not applicable

Thank you @JR-BejeweledOne , 

 

I will try it in the next days and give you feedback, whether it works.😁

 

Reagards

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,742)