cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Lookup Function cause issue

Hi,

I m not able to use "And" condition inside Look up.. Could some one help me with it? Error: Part of this lookup formula cannot be evaluated remotely due to service limitations.

 

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
hpkeong
Level 10

Re: Lookup Function cause issue

Hi

 

Why sorting out solutions, please hold to check when Update is available where Context Variable is delegatable.

 

https://powerapps.microsoft.com/en-us/blog/powerapps-560-update/

 

Use context variables in delegatable expressions
You can now use context variables as part of delegable expressions. In the examples below, Filter and Lookup delegate the query to the service side even though they contain context variables.
Filter('[dbo].[Customers]', MyCtxVariable in FirstName)
LookUp(Filter('[dbo].[Customers]', MyCtxVariable in FirstName), LastName <> MyCtxVariable2)
 

It is on the way.

 

hpkeong

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Re: Lookup Function cause issue

Capture.PNG

hpkeong
Level 10

Re: Lookup Function cause issue

Hi

 

In fact, this is not an error, but rather limitation when this formula is processed thru all the data.

It will still process but when data hit certain quantity, it will not display or stop processing.

 

May you change "=" to "in" or "exactin" and let see what happens!

If the blue warning still exist, I would suggest to use ClearCollect.

 

Hope this helps.

hpkeong
Anonymous
Not applicable

Re: Lookup Function cause issue

Both "in" and "exactin" shows the blue mark.

 

Could you please let me know where I should use ClearCollect?

 

Capture.png

Community Support Team
Community Support Team

Re: Lookup Function cause issue

Hi Gopi,

Could you please explain a bit regarding the formula you used here, specially the bold part within And functions?

lookup('[dbo].[Customer_Master]',

          and(Sales_Org=SALES_ORGANIZATION_ID,

                 Distribution_Channel=DISTRIBUTION_CHANNEL_CDE),

           CUSTOMER_NM)

I suspect Sales_Org and Distribution_Channel should be the column name under the table [dbo].[Customer_Master], what the other two indicate here?

Check the lookup function document: Filter, Search, and LookUp functions in PowerApps.

In addition, if you are using Textbox, and editing the Text attribute, then I think ClearCollect might not work here, as this function only works under behavior formulas .

 

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Lookup Function cause issue

Hi,

The other two is also fields which is coming from other data source ([dbo.Customer_Contacts]).

 

Actually, i need the output from [dbo.Customer_Master] which user selected the item in displayed form in app (Data source is [dbo.Customer_Contacts])

 

kindly let me know if something is unclear here.

 

 

Capture.PNG

 

Capture.PNG

Community Support Team
Community Support Team

Re: Lookup Function cause issue

Hi Gopi,

 

May I know what the control that you used here?

 

A custom Gallery, or something else?

 

Lookup function would require the condition in the following format:

Lookup(Table, and(Tablecolumn1=Value1, Tablecolumn2=Value2), ResultColumn)

Based on the description and my understanding, I suspect the formula should be:

Lookup('[dbo.Customer_Master]', and(Sales_Org=[Value Input for SALES_ORGANIZATION_ID],
                 Distribution_Channel=[value Input for DISTRIBUTION_CHANNEL_CDE]),CUSTOMER_NM)

For the Value input, that depends on what control or Input Method that used.

Please share more details regarding the gallery, so I could make some test from my side and share the results out.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Lookup Function cause issue

Hi,

 

it's a vertical gallery not the custom. Data source for gallery is dbo.customer_master

 

Capture.PNG

hpkeong
Level 10

Re: Lookup Function cause issue

Hi

 

Why sorting out solutions, please hold to check when Update is available where Context Variable is delegatable.

 

https://powerapps.microsoft.com/en-us/blog/powerapps-560-update/

 

Use context variables in delegatable expressions
You can now use context variables as part of delegable expressions. In the examples below, Filter and Lookup delegate the query to the service side even though they contain context variables.
Filter('[dbo].[Customers]', MyCtxVariable in FirstName)
LookUp(Filter('[dbo].[Customers]', MyCtxVariable in FirstName), LastName <> MyCtxVariable2)
 

It is on the way.

 

hpkeong

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,679)