cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
addy2019
Advocate V
Advocate V

'in' delegable but 'not in' throwing delegation warning

I'm trying to Collect() more than 2000 records returned by Filter() using ForAll() iterations. In first iteration it collects 2000 records in 2nd iteration i'm trying to exclude all 'Unique Id's that don't exist in Collection(created in 1st iteration). To achieve that I'm using Not('Unique Id' in repodata.'Unique Id') inside Filter for which it is giving Delegation warning, due to which Filter is only returning 1st 2000 rows in every loop & therefore 0 records are getting collected. Here's the code, please help:

 

UpdateContext({iter:RoundUp(CountRows(Filter(
   'DataSource',
   Sales_Id in ComboBox1.SelectedItems.Sales_Id ||
   'Name.1' in ComboBox1.SelectedItems.Name ||
   'Name.2' in ComboBox1.SelectedItems.Name ||
   'Name.3' in ComboBox1.SelectedItems.Name ||
   'Name.4' in ComboBox1.SelectedItems.Name
))/2000,0)});
Clear(repodata);ForAll(Sequence(iter),Collect(repodata,Filter(
   'DataSource',
   (Sales_Id in ComboBox1.SelectedItems.Sales_Id ||
   'Name.1' in ComboBox1.SelectedItems.Name ||
   'Name.2' in ComboBox1.SelectedItems.Name ||
   'Name.3' in ComboBox1.SelectedItems.Name ||
   'Name.4' in ComboBox1.SelectedItems.Name),
   Not('Unique Id' in repodata.'Unique Id')//Here it is giving Delegation warning
   )))

 

 

22 REPLIES 22

Sure @WarrenBelz I'll have another look at it & also your blogs & if it works & better in any sense will also use it. Just Fyi, another reason I didn't chose your code was that 'Unique Id' in following snippet of your code was giving red curly error saying "Expecting a Number".  

            'Unique Id' > MaxMin.LowID && 
            'Unique Id' <= MaxMin.HighID

Currently I've moved forward with what @victorcp suggested.

@addy2019 

Unique ID needs to be a number - that is the whole purpose of what I posted.

addy2019
Advocate V
Advocate V

Hi @WarrenBelz ,

 

Sorry for late reply i was on vacation. Unique Id was an Index field in Dataflow which Dataverse is interpreting as text. I tried converting it into #Autonumber but its still a text

 

addy2019_0-1664946757736.png

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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