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

Load SharePointList Columns into existing collection

Hello,

I have an app with a titlefield, a gallery and two buttons (save, load).

 

When I want to load the listdata (depending on the titlefield) I use following code:

Clearcollect(HoursCollection; Showcolumns(Filter(SPlistHours; Title = AppTitle.Text); "Title"; "Hours")

 

In the Collection I already have the columns 'ColTitle' and 'ColHours'. So I want to load the Title and hours in those existing columns.

How can I do that?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Load SharePointList Columns into existing collection

@Sgalle 

If the issue is simply that your column names do not match you can use RENAMECOLUMNS.

ClearCollect(
    HoursCollection;
    RenameColumns(
    Showcolumns(
        Filter(SPlistHours; Title = AppTitle.Text);"Title"; "Hours"
    );
    "Title","colTitle",
    "Hours","colHours"
)

 

Please show me a sample of what the collection looks like before the changes and after the changes if my suggestion is not what you wanted.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Load SharePointList Columns into existing collection

@Sgalle 

If the issue is simply that your column names do not match you can use RENAMECOLUMNS.

ClearCollect(
    HoursCollection;
    RenameColumns(
    Showcolumns(
        Filter(SPlistHours; Title = AppTitle.Text);"Title"; "Hours"
    );
    "Title","colTitle",
    "Hours","colHours"
)

 

Please show me a sample of what the collection looks like before the changes and after the changes if my suggestion is not what you wanted.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Frequent Visitor

Re: Load SharePointList Columns into existing collection

Great! That worked. Thanks!

Highlighted
Super User
Super User

Re: Load SharePointList Columns into existing collection

@Sgalle 

Awesome.  I am glad we solved the issue 🙂

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,190)