cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rhalabicki
Level: Power Up

Gallery Row Duplication

I have a Gallery on a collection with a working search str that limits the results in based on StartsWith function.

 

My problem is that the column I am searching on is distinct (lets say list of ZIP Codes), but once it matches to a record, the whole Gallery display is just a list of the same row repeatedly

 

so if you search for 90210 the data table returns 12 rows with 90210..

3 REPLIES 3
pcaracc
Level 8

Re: Gallery Row Duplication

Can you post the exact code you use to limit the results with StartsWith?

Community Support Team
Community Support Team

Re: Gallery Row Duplication

Hi @rhalabicki,

 

I guess that you are using Distinct inside the Filter function, that's the reason why it returns multiple duplicated record. You should use Filter inside the Distinct functions. But notice that Distinct returns a one-column table that contains the results, with duplicate values removed. That means that in Distinct(Filter(Table,formula),ColumnName) only "ColumnName" column would return. 

 

I just create the below collection:

ClearCollect(C,{Name:"1"},{Name:"1"},{Name:"2"},{Name:"5"})

And this formula works:

Distinct(Filter(C, StartsWith(Name,TextInput1.Text)) ,Name)

捕获.JPG

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rhalabicki
Level: Power Up

Re: Gallery Row Duplication

I'm confused though, the gallery data is distinct on its own.

 

 

Adding distinct breaks the "Items".

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,582)