cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Sgalle
Level: Powered On

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

Sgalle
Level: Powered On

Re: Load SharePointList Columns into existing collection

Great! That worked. Thanks!

Super User
Super User

Re: Load SharePointList Columns into existing collection

@Sgalle 

Awesome.  I am glad we solved the issue 🙂

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

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