web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Updating a whole colum...
Power Apps
Answered

Updating a whole column of a filtered collection from sharepoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,


I have made a powerapp, where I have used some filters to get around 20-30 rows of data from sharepoint(in actual, there are around 2k items in this list)

Once i get the filtered data, is it possible to assign them dates based on sorting one of those columns in ascending/descending order, and I want to do this all at once. Any help will be appreciated. Thanks.

 

e.g the first row date will be 1st Jan,

2nd will be right after x number of days, and third will be x+x+1st Jan etc.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    Hi @Anonymous ,

    Where are you getting the dates from and is there a field int he list to receive it?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz  These dates will be based on a column in this list. It will be the apps job to populate dates based on this column. What i want to do is, to add multiple dates all at once to a filtered collection based on an existing column. 
    E.g one column will have values of 10 and 20

    So the app will arrange these numbers in descending order first, so 20 will be at top, and will be given a default date of 1st Jan, then next values will base upon 1st Jan + x number of days, and so on ...

  • eka24 Profile Picture
    20,925 on at

    Try this Collection;

    ClearCollect (MyTable2, AddColumns (Datasource,"NewCollumn",DateAdd(DateColumn,ColumnWithTheNumbers))

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @eka24 
    I already have a column that will hold the date values which the application will assign, but they are all blank currently.

    I want to assign dates to these blank fields in this date column based on the numbers column. I hope you get what I'm trying to say.

  • Verified answer
    WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    Hi @Anonymous ,

    The first thing you need to do is collect the filtered data

    ClearCollect(
     colFirstStage,
     Filter(
     MySPList,
     <However I am filtering it>
     )
    )

    Then you can add some numbers to it

    Clear(colNextStage);
    ForAll(
     FirstStage,
     Collect(
     colNextStage,
     Last(
     FirstN(
     AddColumns(
     FirstStage,
     "RowNumber",
     CountRows(colNextStage) + 1
     ),
     CountRows(colNextStage) + 1
     )
     )
     )
    )

    Then put some dates in it

    Clear(colLastStage);
    ForAll(
     colNextStage,
     Collect(
     colLastStage,
     AddColumns(
     colNextStage,
     "MyDate",
     DateAdd(
     YourDatePicker.SelectedDate,
     RowNumber-1,
     Days
     )
     )
     )
    )

    You would put the day you wanted to start in the date picker.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz  I can not thank you enough! You are an absolute genius sir! You've made my week! Thank you!! 
    God Bless.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard