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."

Great! That worked. Thanks!

@Sgalle 

Awesome.  I am glad we solved the issue 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,813)