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:
Act | Wrk | Var | UNIT |
6.80 | 3.11 | 3.68 | Admin |
115 | 112 | 287 | Test Account |
19.80 | 28.08 | 8.28 | Superuser |
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
Solved! Go to Solution.
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,
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.
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,
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |