cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jvr1
New Member

Show only one of duplicate values in gallery

I'm wondering how I can work around the below issue: 

 

jvr1_0-1593025491685.png

In the search box, the name of a project can be inserted. The gallery should show all suppliers who were engaged in this project (I have a table 'Contactmoment_1' in which all contact moments with a certain supplier for a specific project are inserted). However, one supplier could be engaged at multiple occasions in the same project. In that case, I only want to show this supplier once (and not for all occasions we engaged them in the same project).

 

Any help on this issue?

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @jvr1 ,

Yes the Distinct() function is the answer for your case.

The correct formula syntax:

 

Gallery.Items property :
Distinct(Search([@Contactmoment_1];Zoekbalk.Text;"Klank"), 'Supplier Column') 

 

Then, set the Text property of label in the gallery to ThisItem.Result

Hope this helps,
Sik

View solution in original post

4 REPLIES 4
Cooper01
Responsive Resident
Responsive Resident

You should be able to use distinct

eka24
Super User III
Super User III

I suggest you do the Distinct OnVisible of the Screen:

Distinct(ClearCollect(MyContactmoment,[@Contactmoment_1])

 

Then use the following on the Gallery

Search(MyContactmoment;Zoekbalk.Text;"Klank")

v-siky-msft
Community Support
Community Support

Hi @jvr1 ,

Yes the Distinct() function is the answer for your case.

The correct formula syntax:

 

Gallery.Items property :
Distinct(Search([@Contactmoment_1];Zoekbalk.Text;"Klank"), 'Supplier Column') 

 

Then, set the Text property of label in the gallery to ThisItem.Result

Hope this helps,
Sik

View solution in original post

Hi @v-siky-msft 

 

Yes, this helps!

Thanks!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (20,734)