Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Add Columns from another SharePoint List to existing collection

(1) ShareShare
ReportReport
Posted on by 6
I have three SharePoint lists that i want to make up my one collection.  Two of the lists have under 200 items in it, the third has over 2000 items.  I am able to combine them all OnStart of the app but the load time takes a while.  I am trying to speed things up by getting the first two lists added OnStart then OnVisible of the app add in the bigger list to the collection. I get no errors for the code but when i check my collection the new column is not added onVisible.
 
OnStart:
ClearCollect(
    colResumeDB,
    Filter(
        SortByColumns(
            AddColumns(
                'Resume Database',
                'Employee Name',
                Last(
                    Split(
                        Name.DisplayName,
                        " "
                    )
                ).Value & ", " & First(
                    Split(
                        Name.DisplayName,
                        " "
                    )
                ).Value,
                DegreeType,
                Concat(
                    Filter(
                        'Resume Education',
                        ResumeID = 'Resume Database'[@ID]
                    ),
                    'Degree Type'.Value,
                    " "
                ),
                FieldStudyType,
                Concat(
                    Filter(
                        'Resume Education',
                        ResumeID = 'Resume Database'[@ID]
                    ),
                    'Field of Study'.Value,
                    " "
                ),
                StudyOther,
                Concat(
                    Filter(
                        'Resume Education',
                        ResumeID = 'Resume Database'[@ID]
                    ),
                    'Study Other',
                    " "
                ),
                School,
                Concat(
                    Filter(
                        'Resume Education',
                        ResumeID = 'Resume Database'[@ID]
                    ),
                    'University/School',
                    " "
                )
            ),
            "Employee Name",
            SortOrder.Ascending
        ),
        EmployeeStatus.Value = "Active"
    )
);
OnVisible:
AddColumns(
    colResumeDB,
    JobTitle,
    Concat(
        Filter(
            'Resume Work History',
            ResumeID = 23
        ),
        'Job Title',
        " "
    )
)
Any help would be appreciated.  Thanks 
  • WarrenBelz Profile Picture
    146,601 Most Valuable Professional on at
    Add Columns from another SharePoint List to existing collection
    Exactly what type of field is 'Degree type'
  • Chris2131 Profile Picture
    6 on at
    Add Columns from another SharePoint List to existing collection
    No luck @WarrenBelz.  Got the same error with the updated code.  I tried the below as well and got back the ? as well as it saying [object Object] when previewing the collection. 
     
     DegreeType,
                Value(
                    Concat(
                    _Resume.'Degree Type',
                    " "
                    )
                )
     
  • WarrenBelz Profile Picture
    146,601 Most Valuable Professional on at
    Add Columns from another SharePoint List to existing collection
    Updated rather than reposting - try that.
  • Chris2131 Profile Picture
    6 on at
    Add Columns from another SharePoint List to existing collection
    Hi @WarrenBelz, thank you for the help.  I think this is very close.  One thing I noticed is that when i am trying to Concat the choice fields I am getting an error on the Value piece.
     
    The error goes away if i remove Value but then in the collection I see a ? mark instead of the data.
  • WarrenBelz Profile Picture
    146,601 Most Valuable Professional on at
    Add Columns from another SharePoint List to existing collection
    A couple of suggestions here as the code you have seems to be valid. To speed this up and do it in one action,
    • Firstly grab the data set you want - this will greatly simplify the filter to the data source
    • Then add a field (it will be a Table) with the matching records from the second list
    • Then add all the columns from a field you already now have as well as the last field from the third list
    With(
       {
          _Data1:
          Filter(
             SortByColumns(
                'Resume Database',
                "Employee Name",
                SortOrder.Ascending
             ),
             EmployeeStatus.Value = "Active"
          )
       },
       With(
          {
             _Data2:
             AddColumns(
                _Data1,
                _Resume,
                Filter(
                   'Resume Education',
                   ResumeID = ID
                )
             )
          },         
          ClearCollect(
             colResumeDB,
             AddColumns(
                _Data2,
                'Employee Name',
                Last(
                   Split(
                      Name.DisplayName,
                      " "
                   )
                ).Value & ", " & 
                First(
                   Split(
                      Name.DisplayName,
                      " "
                   )
                ).Value,
                DegreeType,
                Concat(
                   _Resume.'Degree Type',
      Value, " " ), FieldStudyType, Concat( _Resume.'Field of Study',
      Value, " " ), StudyOther, Concat( _Resume.'Study Other', " " ), School, Concat( _Resume.'University/School', " " ), JobTitle, Concat( Filter( 'Resume Work History', ResumeID = 23 ), 'Job Title', " " ) ) ) )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,601 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard