cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dauren08
Helper II
Helper II

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.

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

Thank you @JR-BejeweledOne , 

 

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

 

Reagards

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,419)