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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

PowerApps

(0) ShareShare
ReportReport
Posted on by 52

Hi Guys,

 

I have a gallery that displays the list of products (Sharepoint data source), I want to archive some products to another gallery after the product(s) are selected.
1: Use a checkbox to select the products or the product to be archived to the second gallery.

2: Set a button either inside or outside the gallery to perform the move action.
once the action is successful, the product disappears from the first gallery without being deleted from the database (sharepoint list).
3: Restore the archived product from the archive gallery to the source gallery.

Here's if anyone has a better approach to making this possible.

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    There are some variations on how you can accomplish this, but here's one way:

    • Add a boolean (yes/no) column to your SharePoint list to indicate if the item is archived or not (IsArchived)
    • Set one gallery to Filter() using IsArchived = true, set the other gallery to Filter() using IsArchived = false
    • Put a checkbox control in the gallery template that uses IsArchived = false and put the following code in the OnCheck property of that checkbox:
    Patch(myListName, ThisItem, {IsArchived: true})

    Once the Patch() executes, the galleries will sense the change to the table and the item will move from one gallery to the other.

     

    Hope that helps,

    Bryan

  • 242F_low Profile Picture
    52 on at

    @BCLS776  I'll try it.

  • 242F_low Profile Picture
    52 on at

    @BCLS776 Hi,

    This process is working perfectly, but I want to wwhat default value can apply in sharepoint list regarding the checkbox, cause all product need to be visible in the first gallery before they archived.

  • 242F_low Profile Picture
    52 on at

    Filter(
    Habilitation;
    (IsBlank(cbTaskStatutFilter.Selected) || Statut.Value = cbTaskStatutFilter.Selected.Value) &&
    (IsBlank(TextInputSearch.Value) || Statut.Value = TextInputSearch.Value || StartsWith('Nom Complet'.Value; TextInputSearch.Value)) &&
    Archiver = false
    )

  • BCLS776 Profile Picture
    8,994 Moderator on at

    If you want to set the default value for this column for when the item is created, look in the column settings back in the SharePoint list. You'll be able to set the default there.

     

    Bryan

  • 242F_low Profile Picture
    52 on at

    @BCLS776 

    Yes I already do that and it work thank's

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard