Hello, I have a gallery where I wrote a code to show more than 2000 items in a gallery, but when I filter I can see duplicates, because of my approach. How can I show only distinct items in gallery?
This is code in my gallery -> items
//Filter already filtered SP list (first argument) based on conditions (second argument)
Filter(
//Filter SP list and return items which match below criteria
Filter(
colAssignedOxrs,
(drp_ViewScreen_FilterPane_Region.Selected.Value = Region And drp_ViewScreen_FilterPane_Team.Selected.Value = Team)
),
//Check if field is blank or not. If it is blank return true, if it is not blank than check if trimed user input exist defined column in SPlist
If(IsBlank(txt_ViewScreen_StaticFilterPane_OxrAssigned.Text),
true,
Trim(txt_ViewScreen_StaticFilterPane_OxrAssigned.Text) in 'OXR Assigned'
),
If(IsBlank(txt_ViewScreen_StaticFilterPane_AccountNumber.Text),
true,
Trim(txt_ViewScreen_StaticFilterPane_AccountNumber.Text) in 'Account Number'
),
If(IsBlank(txt_ViewScreen_StaticFilterPane_AccountName.Text),
true,
Trim(txt_ViewScreen_StaticFilterPane_AccountName.Text) in 'Account Name'
),
If(IsBlank(txt_ViewScreen_StaticFilterPane_CoreId.Text),
true,
Trim(txt_ViewScreen_StaticFilterPane_CoreId.Text) in 'Core ID'
),
If(IsBlank(txt_ViewScreen_StaticFilterPane_ReportsToManager),
true,
//check user input in columns "Reports to Person" and "Manager Person", because we don't know if user meant reports to person or manager
Trim(txt_ViewScreen_StaticFilterPane_ReportsToManager.Text) in Supervisor Or Trim(txt_ViewScreen_StaticFilterPane_ReportsToManager.Text) in Manager
)
)
This is example of my filtered gallery:

You can see that these two items have the same 'Custom ID' - 2.