Image default
Technology

Power Apps – Filter Gallery to only show Duplicate values –

[ad_1]

Power Apps Filter Gallery

It is common to want to filter your gallery to remove duplicate values but at some point, you may want to only show the duplicate items. In this article, We will show you how to within power Apps, Filter your Gallery to only show duplicate items.

Power Apps Filter Gallery to Only Show Duplicate Values

Example Scenario-

An Asset management app has been created with a Gallery that points to a SharePoint list, Asset database. All users should only have one type of asset assigned to them for example a laptop or mobile phone.  A filter is to be created to only see records if a user has a duplicate Asset type of mobile phone with the status of assigned. A dropdown is created at the top of the page with the filter option.

Solution –

Use the below as the items property for the Gallery


If(Dropdown1.Selected.Value = ‘Duplicate Laptops’,

Filter(
   AddColumns(
      GroupBy(
         Filter(
         'Asset Database', 
            'Asset Type = "Laptops" && 
            Status.Value = "Assigned"
         ),
         "YourUserFieldName"
         "Data"
      ),
      "Duplicates",
      CountRows(Data)
   ),
   Duplicates > 1
)

[ad_2]

Source link

Related posts

Using AI in Digital Marketing

Major Rhys

How to Use If Statements in PowerShell –

Charles Sylva

Pin Items Next to the Power Button in Windows 11 Start Menu –

Charles Sylva