cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Lookup Function with Date equal Date (without delegation limit)

Hello guys,

 

I checked almost all messages but anyway I couldn't find any solution for remove delegation errors...

In my app I tried to get currency rate from 'Rate' table with DatePicker control...

 

When I used that formula;

 

LocalPrice: Value(TextInput2_85.Text) * If(
ComboBox1_64.Selected.ID = 1,LookUp(Rate,Date = DatePicker1.SelectedDate, EUR),
ComboBox1_64.Selected.ID = 2,LookUp(Rate,Date = DatePicker1.SelectedDate, USD))

 

No any error, alert or something. But value is zero...

In Rate table, Date column is Date...

 

When I changed formula to;

 

LocalPrice: Value(TextInput2_85.Text) * If(
ComboBox1_64.Selected.ID = 1,LookUp(Rate,Text(Date) = Text(DatePicker1.SelectedDate), EUR),
ComboBox1_64.Selected.ID = 2,LookUp(Rate,Text(Date) = Text(DatePicker1.SelectedDate), USD))

 

Value is correct, but I get a deligation error...

 

My data in sharepoint list. If you use lookup with text deligation limit is 2000, but with date no limit...

How can I fixed that?

Thanks...

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Lookup Function with Date equal Date (without delegation limit)

@onurisik
When using LOOKUP on a SharePoint list and Date type data you will not be able to see past 2,000 rows. Currently dates do not have support for delegation. Only the data types and functions in this list do: https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/.

The only way I know to get around this is to change your dates to numbers. Example 2020-02-08 becomes 20200208 in your SharePoint list.

Then when you choose a Date using the DatePicker you can load a variable like this. Put this code in the OnChange property of the DatePicker.

Set(myChosenDate, Value(Text(DatePicker1.SelectedDate, “yyyymmdd”)))

Finally you can rewrite any LOOKUP formulas in a style similar to this.

LookUp(Rate, Date=myChosenDate, EUR)

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: Lookup Function with Date equal Date (without delegation limit)

Hi @onurisik ,

Date queries are not delegable and cannot be properly queried on large data sets, however if you have less than 2000 records in your target lists, collect them and query the collection (you will have to increase the limit in PowerApps settings) and your formulas should work as expected.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Super User
Super User

Re: Lookup Function with Date equal Date (without delegation limit)

@onurisik
When using LOOKUP on a SharePoint list and Date type data you will not be able to see past 2,000 rows. Currently dates do not have support for delegation. Only the data types and functions in this list do: https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/.

The only way I know to get around this is to change your dates to numbers. Example 2020-02-08 becomes 20200208 in your SharePoint list.

Then when you choose a Date using the DatePicker you can load a variable like this. Put this code in the OnChange property of the DatePicker.

Set(myChosenDate, Value(Text(DatePicker1.SelectedDate, “yyyymmdd”)))

Finally you can rewrite any LOOKUP formulas in a style similar to this.

LookUp(Rate, Date=myChosenDate, EUR)

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

Highlighted
Frequent Visitor

Re: Lookup Function with Date equal Date (without delegation limit)

Thanks, It's done...

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,849)