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
)))
Solved! Go to Solution.
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.
Unique ID needs to be a number - that is the whole purpose of what I posted.
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
User | Count |
---|---|
260 | |
110 | |
97 | |
56 | |
40 |