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

Select All checkbox

(0) ShareShare
ReportReport
Posted on by 726

I have a gallery that lists all the items, this can be filtered by date created with to and from range and then exported to CSV, At the moment the user need to tick each checkbox, but I'd like to add a select all button that would only select those visible from the filtered option. 

 

Gallery Items 

 

Sort(Filter(
 colDWB,
 (Due_x0020_Date >= DatePicker1.SelectedDate) && (Due_x0020_Date <= DatePicker2.SelectedDate)), ID, Descending)

 

 

Refresh button - OnSelect 

 

ClearCollect(colDWB, AddColumns('Dont Walk By', "IsChosen", false))

 

 

Export to CSV button 

 

Set(varDrop, DropColumns(Filter(colDWB, IsChosen), "Author", "Assigned_x0020_to", "Category", "Editor", "Manager", "Priority", "joim" , "{Thumbnail}", "Related_x0020_Issues"));
Set(varFormattedJSON, JSON(varDrop, JSONFormat.IndentFour)); 


ExportToCSV_Email.Run(varFormattedJSON)

 

 

OnCheck on checkbox 

 

Patch(colDWB, ThisItem, {IsChosen: true})

 

OnUncheck of checkbox 

 

Patch(colDWB, ThisItem, {IsChosen: false})

 

 

This works great each item that ticked can then be exported, but id like to add a select all option

 

amyharkus86_0-1625133151891.png

 

Not sure who to do this without removing my already working and required export function. 

 

 

Categories:
I have the same question (0)
  • JamesYumnam Profile Picture
    on at

    if you want to export all the filtered results currently displayed in the gallery, why to add extra effort to use a select all checkbox? I think, in that case, you can just add the code in your Export to CSV button along with a condition to export the items displayed in the gallery (you already have code for export). 

  • amyharkus86 Profile Picture
    726 on at

    @JamesYumnam The filter is used to date range a month or whatever but not always is every item in that filtered needed to be exported, for example if the status is closed we wouldn't need to export the item, althogh in my example above all items would be, within the filtered month there could be 20 items but only 10 of those would need to be exported. 

     

    In regards to adding a filter on the export button 

     

    Set(varDrop, DropColumns(Filter(colDWB, IsChosen), "Author", "Assigned_x0020_to", "Category", "Editor", "Manager", "Priority", "joim" , "{Thumbnail}", "Related_x0020_Issues"));
    Set(varFormattedJSON, JSON(varDrop, JSONFormat.IndentFour)); 
    
    
    ExportToCSV_Email.Run(varFormattedJSON)

     

  • amyharkus86 Profile Picture
    726 on at

    sorry that was suppose to say , could i do this? 

    if i just wanted to export the filtered month?

     

    Set(varDrop, DropColumns(Filter(colDWB, Due_x0020_Date >= DatePicker1_1.SelectedDate && Due_x0020_Date <= DatePicker2_1.SelectedDate ), "Author", "Assigned_x0020_to", "Category", "Editor", "Manager", "Priority", "joim" , "{Thumbnail}", "Related_x0020_Issues"));
    Set(varFormattedJSON, JSON(varDrop, JSONFormat.IndentFour)); 
    
    
    ExportToCSV_Email.Run(varFormattedJSON)

     

  • Verified answer
    JamesYumnam Profile Picture
    on at

    @amyharkus86 if i understand correctly, your gallery has the result after applying certain filters.

    and with this result, you have got two requirements:

    1. to be able to export selected items from the gallery
    2. to be able to export all the items in the gallery (because those are filtered already).

    Now, your requirement 1 is fulfilled as you are able to select few items and then export them.

    for requirement 2, you just need to export all the items in the gallery in the following manner.

    In Export to CSV button, use an If condition.

    • If the count of selected items in the gallery > 0,
    • then export selected items only from the gallery.
    • else, export all the items in the gallery.

    Please let me know if got your requirements correctly, then i may be able to help you out.

  • amyharkus86 Profile Picture
    726 on at

    @JamesYumnam thankyou for your reply, after discussing further with the department this is for its been decided that they wish to export all items in a view, so i have done as you suggested and export based on the filter, no need for tick boxes 

     

    Set(varDrop, DropColumns(Filter(colDWB, Due_x0020_Date >= DatePicker1_1.SelectedDate && Due_x0020_Date <= DatePicker2_1.SelectedDate ), "Author", "Assigned_x0020_to", "Category", "Editor", "Manager", "Priority", "joim" , "{Thumbnail}", "Related_x0020_Issues"));
    Set(varFormattedJSON, JSON(varDrop, JSONFormat.IndentFour)); 
    
    
    ExportToCSV_Email.Run(varFormattedJSON)

     

     

     

     

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 Automate

#1
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard