cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
patricia_r
Helper I
Helper I

Formula for some reason not working as expected.

Hello,

 

I need your assistance on determining if the formula that i am using is wrong or i need to add to it. I have a dropdown where i select list of communities that i am getting from my datasource which is SharePoint yet i am seeing duplicates and i don't understand why. Here is the formula i am using:  Sort(Distinct(FormInput, CommunityName), Result). Any ideas on why this would be happening?

 

Thank you

6 REPLIES 6
CNT
Community Champion
Community Champion

@patricia_r Are all these Community Names spelt correctly without any extra spaces? Could you share u'r SP List and also your gallery.

zmansuri
Memorable Member
Memorable Member

a42.jpg

Your formula looks fine. I did testing on my side. Its working

@CNT Yes they are spelled correctly. Also i am noticing that all of them are not showing up either. I know that Distinct is not a delegable query. I have over 80 different communities. 

CNT
Community Champion
Community Champion

@patricia_r How many records do you have in the SP List in total?

@CNT they are over 2K 

PowerApps can manage only 2000 items max

If your SP is over 2k yo will need to create Collections in PowerApps to collect the data and the create the master collection to join all the values 

In the On Start option or On Visble (of your first sceen)
insert this

ClearCollect(
Collection_1,
Filter(
SP_List,
ID < 2000
)
);
ClearCollect(
Collection_2,
Filter(
SP_List,
ID > 2000 && ID < 4000
)
);
ClearCollect(
Master,
Collection_1,
Collection_2
)  //Your will need to use a differente ID column the ID from SP wont work for this formula



Then in your dropdown use your formula

Sort(Distinct(Master, CommunityName), Result)



 

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 Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,885)