cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TrulsB
Helper III
Helper III

Dropdown box has somtimes a delay showing new (newly created) elements in the sharepoint lookup list.

In a Sharepoint form i have a  combo box (with search). The combo box has Item:Choices(Orders).Product.  

In the Sharepoint list Orders,  the Product field is a lookup field to the list Products.  This works well. 

 

Creating av ned product in the products field can be done from the Sharepoint screen. I have created 3 fields, and uses Patch to create a element in the Products list. 

 

Patch(Products; Defaults(Products);{Product: dcProduct.Text;Active: true;ProductNo: dcProductNo.Text})

This works also well. 

 

The problem is after i have created the Product from the Sharepoint screen, and then search for the product in the Product field there is somtimes a delay before the new Product shows up in the dropdown box.   Sometimes it show imidetily, somtimes it can be 30-60 seconds before i can see the product using search.    

 

The product is created without delay, but the delay appears somtimes n the dropdown box.  

 

Any idea how to avoid that the delay somtimes appears ?

 

5 REPLIES 5
AmDev
Solution Sage
Solution Sage

Hi @TrulsB 

 

Do you need the loopup for any other purpose apart from being used as choices in your app?

 

If not, add your 'products' list as a new data source to your app and reference your products list in the combobox 'Items'  property by adding the following: Products.Products. Also just amend your fields to refer to the Products value (instead of 'title' in the following...)

 

AmDev_0-1637667314918.png

 

Hope this helps - good luck!

 

v-bofeng-msft
Community Support
Community Support

Hi @TrulsB :

You could refresh the data source after you patch the record, and then the problem should be solved.please try:

Patch(Products; Defaults(Products);{Product: dcProduct.Text;Active: true;ProductNo: dcProductNo.Text});;Refresh(Orders)

In addition,I'm afraid this code will not work:

Choices(Orders).Product

please try:

Choices(Orders.Product)

Best Regards,

Bof

Thanks, 

I wrote incorrect about the Choice.  Im using Choices([@Orders].Product)

 

I have tried the Refresh(Orders) after the patch, but still there is a delay.  Not for evry new product, but mybe after 2 of 10.

 

Hi, i tried but run into a delegation warning/problem.   The Product list is almost 2000 elements and is going to grow to 2500 elements. 

Hi @TrulsB :

I think the formula you provided will not involve delegation issues.If this is a new problem, I suggest you consider creating a new thread.

By the way, if you use a function that cannot be delegated, then the delegation problem cannot be solved.

Best Regards,

Bof

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,523)