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 III
Super User III

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 III
Super User III

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 III
Super User III

Re: Load SharePointList Columns into existing collection

@Sgalle 

Awesome.  I am glad we solved the issue 🙂

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published 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 (7,003)