cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dips97
Frequent Visitor

How to create a collection with columns in different sharePoint Lists

Hi, I want to bind SharePoint lists and create a collection from SharePoint Lists columns. I have 4 lists
List A

A_IDD_IDA_DueDateA_Status
1103-03-2021New
2203-15-2021Approved

 

List B

B_IDB_Name

1

Alex
2Tony

 

 

List C

C_IDC_CountryC_PostCode
1USA12345
2UK23456

 

List D

D_IDB_IDC_IDD_Value
111125
222256


The New Collection that I want to create will look like-

A_IDA_DueDateB_Name & C_CountryC_PostCodeD_ValueA_Status
103-03-2021Alex, USA12345125New
203-15-2021Tony, UK23456256Approved

 

Is it possible to create a collection to fetch data from different SharePoint List?
with my information I mentioned all queries If you want to know more please reply.
Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Dips97 

Consider the following formula for what you need:

With({_listA: ListA,    //Possibly you want to filter your List here
      _listB: ListB,    // same as above
      _listC: ListC     // same as above
      _listD: ListD     // same as above
     },

    ForAll(_listA As _listAitem,
        With({_listBitem: LookUp(_listB, B_ID = _listAitem.A_ID),
              _listCitem: LookUp(_listC, C_ID = _listAitem.A_ID),
              _listDitem: LookUp(_listD, D_ID = _listAitem.A_ID)},

        {A_ID: _listAitem.A_ID,
         A_DueDate: _listAitem.A_DueDate,
         'B_Name C_Country' : _listBitem.B_Name & ", " & _listCitem.C_Country,
         C_PostCode : _listCitem.C_PostCode,
         D_Value: _listDitem.D_Value,
         A_Status: _listAitem.A_Status
        }
    )
)

 

This will return a table based on your information and requirement.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

1 REPLY 1
RandyHayes
Super User III
Super User III

@Dips97 

Consider the following formula for what you need:

With({_listA: ListA,    //Possibly you want to filter your List here
      _listB: ListB,    // same as above
      _listC: ListC     // same as above
      _listD: ListD     // same as above
     },

    ForAll(_listA As _listAitem,
        With({_listBitem: LookUp(_listB, B_ID = _listAitem.A_ID),
              _listCitem: LookUp(_listC, C_ID = _listAitem.A_ID),
              _listDitem: LookUp(_listD, D_ID = _listAitem.A_ID)},

        {A_ID: _listAitem.A_ID,
         A_DueDate: _listAitem.A_DueDate,
         'B_Name C_Country' : _listBitem.B_Name & ", " & _listCitem.C_Country,
         C_PostCode : _listCitem.C_PostCode,
         D_Value: _listDitem.D_Value,
         A_Status: _listAitem.A_Status
        }
    )
)

 

This will return a table based on your information and requirement.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (81,030)