cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sgalle
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
mdevaney
Super User
Super User

@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
mdevaney
Super User
Super User

@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

Sgalle
Frequent Visitor

Great! That worked. Thanks!

@Sgalle 

Awesome.  I am glad we solved the issue 🙂

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
Top Kudoed Authors
Users online (2,148)