I was under the impression the lookup function was delegable. I have a formula that populates the item field of a displayform. However, it only works for the first 500 rows.
If(Len(tSS_2.Text)=9,Set(itemRecord,LookUp(dataSourceRead,UNIQUE_ID=tSS_2.Text)), Set(itemRecord, LookUp(dataSourceRead,BADGE=Value(tSS_2.Text))))
Thoughts?
Solved! Go to Solution.
I found my solution. In the event you're struggling the following worked for me:
Button Press
Set(dataSource,Filter(dataSourceRead,unique_id=id))
Form Item property:
first(datasource)
Form Datasource
datasource
The lookup function is delegable but the Value() is not. You should see a blue squiggly line by that the Value() function.
Hi @KUNGFUPANDA559 ,
What is your data source? Can you share the delegation warning details?
How many rows does data source have?
I have made a test (based on Sharepoint, more than 500 items), and don’t have the delegation issue you mentioned.
As the image shown, the 512th record can be looked up.
By the way, the lookup function , the operator ‘=’, and the data source are all the factors that can’t be delegated.
So please post your data source and delegation warning details to make an accurate judgment.
If you want to overcome the 500 items limitation, you can refer to following:
Click file (top left corner) > App settings > Advanced settings > set value for non-delegable queries.
Note: assume the amount of datasource is 6000, and have the primary identify type column “ID”.
Concurrent( ClearCollect(VarCollection1, Filter(dataSourceRead, ID >= 1 && ID <= 2000)), ClearCollect(VarCollection2, Filter(dataSourceRead, ID >= 2001 && ID <= 4000)), ClearCollect(VarCollection 3, Filter(dataSourceRead , ID >= 4001 && ID <= 6000)), ); ClearCollect( VarCollection, VarCollection 1, VarCollection 2, VarCollection 3)
Tips: If you don’t know the amount of datasource, you can check this:
UpdateContext({firstrecord: First(datasource)}); UpdateContext({lastrecord: First(Sort(datasource, ID, Descending))}); Amount= lastrecord.ID - firstrecord.ID
If(Len(tSS_2.Text)=9,Set(itemRecord,LookUp(VarCollection,UNIQUE_ID=tSS_2.Text)), Set(itemRecord, LookUp(VarCollection ,BADGE=Value(tSS_2.Text))))
Please have a try with above workaround, and check if the issue is solved.
Best regards,
Sik
@v-siky-msft I'm using Azure SQL. Shouldn't i be able to filter the datasource using the conditions in the if then statement?
e.g.
Filter(VarCollection,tss_2.text=unique_id)
The data source is dynamic and each could be as many as 200k records. Surely there has to be an alternative to hardcoding logic for each 2k rows.
I found my solution. In the event you're struggling the following worked for me:
Button Press
Set(dataSource,Filter(dataSourceRead,unique_id=id))
Form Item property:
first(datasource)
Form Datasource
datasource
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
180 | |
52 | |
41 | |
38 | |
29 |
User | Count |
---|---|
243 | |
81 | |
71 | |
69 | |
66 |