cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Priti1
Helper I
Helper I

How to make connection between look up field and data table in power apps?

Hello, 

 

I am a newbie to the Power Apps and trying to figure out the way to make a connection between the lookup field and the data connection. I am customizing the SharePoint form into power apps. 

 

I have a list called "Financials" and "Request Form" in SharePoint. I have created the "Unit", "Var", "Act" and "Wrk" columns in the Financials list and add a "UNIT" as a lookup column in the "Request Form". 

 

I cannot add the screenshot as I do not have permission to upload an image. But this is how I added in power apps. 

 

Now that I have the "Unit" field on the Request form getting data from the Financials list. I added a data table in the power app and connect the data source to the "Financials" list.  And added a "Unit" field from the "Request Form" list. 

 

What I wanted to do is when I select the "Admin" from the UNIT lookup drop down it should pull the "VAR", "ACT" and "Wrk" columns and show their data only instead of showing the entire "Financials" list data. 

 

UNIT - [Lookup dropdown] - I selected "Admin" from the drop-down. Now the data table should only show the first row based on the unit selection that I made from the drop-down. 

 

Data table: 

ActWrkVarUNIT
6.803.113.68Admin
115112287Test Account
19.8028.088.28Superuser

 

Is that possible in the power apps? Where should we add the condition? And what should be the condition? Any help would greatly be appreciated.

 

Thank you, 

Priti

1 ACCEPTED SOLUTION

Accepted Solutions
Priti1
Helper I
Helper I

Hi @WarrenBelz 

 

So I added this code on the Data table Item properties to filter the values based on the unit lookup field selection to filter data in the data table. And it is working the way I was looking for. 

 

Datacardvalue23 = Unit

Filter(Financials,'Unit' = DataCardValue23.Selected.Value)

 

Thanks,

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @Priti1 ,

Just remove the label for UNIT from the table by selecting the column at the top and deleting it..

 

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.

@WarrenBelz  Thank you for your reply but I think I didn’t explain it correctly. I post this message again with the screenshot and I think that would make more sense.

 

what I’m looking for is when I select a value from the UNIT lookup drop down it should only show that row data instead of showing the entire list. The list that I have added as the data table in power apps. 

 

@Priti1 ,

You cannot filter on Lookup columns, so you need to do something like this

Filter(
   AddColumns(
      Financials,
      "UnitNo",
      Unit.Value
   ),
   UnitNo=YourUnitNoDropdownName.Selected.Value
)

You might also take a moment to watch this video from Shane Young @Shanescows and ask yourself do you really need the Lookup column - I have not used them for a long time.

 

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.

Hi @Priti1 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Hi @WarrenBelz  No, I have not got the result yet. I am still testing and trying. I will post the solution here once it is successful. Thank you for checking. 

Priti1
Helper I
Helper I

Hi @WarrenBelz 

 

So I added this code on the Data table Item properties to filter the values based on the unit lookup field selection to filter data in the data table. And it is working the way I was looking for. 

 

Datacardvalue23 = Unit

Filter(Financials,'Unit' = DataCardValue23.Selected.Value)

 

Thanks,

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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