cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jup
Level: Powered On

Problem: FILTER AddColums Lookup

Hi again:

 

this formula works fine:

n1.PNG

 

this formula drops an error - but why?:


n2.PNG

 

I've just added the "filter".

 

Thanks

jup

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Problem: FILTER AddColums Lookup

Hi @jup ,

Yeah, you are right.

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Super User
Super User

Re: Problem: FILTER AddColums Lookup

@jup 

Does Filter('[dbo].[Data]'; reflex="12345") by itself return anything?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
jup
Level: Powered On

Re: Problem: FILTER AddColums Lookup

Yes - 

Filter('[dbo].[Data]'; reflex="12345")

is working fine.

Community Support Team
Community Support Team

Re: Problem: FILTER AddColums Lookup

Hi @jup ,

Could you please share a bit more about the error message with your formula?

 

For your first formula, the AddColumns function is applied to your SQL Table data source ('[dbo].[Data]') itself, so you could reference values from '[dbo].[Data]' table directly.

 

But within your second formula, the AddColumns function is applied to the Filter formula, so you could not reference values from your '[dbo].[Data]' table directly, you could reference values from the result the Filter formula returns.

 

In order to fix your issue, I think RenameColumns function could achieve your needs. Please consider modify your formula as below:

AddColumns(
             RenameColumns(Filter('[dbo].[Data]'; reflex="12345"); "EJ_UID", "EJ_UID1");
             "cust_Tor";
             LookUp('[dbo].[Data_Custom]'; EJ_UID = EJ_UID1).Tor
)

Please take a try with above formula, then check if the issue is solved.

 

More details about RenameColumns function, please check the following article:

RenameColumns function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jup
Level: Powered On

Re: Problem: FILTER AddColums Lookup

Great! It works :-D

 

But if I want to have more fields... is this the right way?? (repeat the lookup part again and again for every field I need):

 

AddColumns(
             RenameColumns(Filter('[dbo].[Data]'; reflex="19-1286.02"); "EJ_UID"; "EJ_UID1");
             "cust_Tor";
             LookUp('[dbo].[Data_Custom]'; EJ_UID = EJ_UID1).Tor;
             "cust_Crew";
             LookUp('[dbo].[Data_Custom]'; EJ_UID = EJ_UID1).Crew;
             "cust_Ladezeit_Lager";
             LookUp('[dbo].[Data_Custom]'; EJ_UID = EJ_UID1).Ladezeit_Lager;
             "cust_Status";
             LookUp('[dbo].[Data_Custom]'; EJ_UID = EJ_UID1).Status            
             
)

Thanks

jup

Community Support Team
Community Support Team

Re: Problem: FILTER AddColums Lookup

Hi @jup ,

Yeah, you are right.

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 156 members 3,680 guests
Please welcome our newest community members: