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

Lookup from another SP List

Dear All,

 

I am pretty new creating power app from and i need your assistance concerning lookup function. I tried to find a solution from internet but even if there are many resource i didn't manage to understand and proceed correctly.

 

- In my submit from there are "Plants Country" and "Plant Code" fields.

- For instance my company has 3 different plants in Turkey

- My aim is once user select TR from "Plant Country", user should only see TR plants code from "plant code" field

- I have a SP list which includes "Plant County" and "Plants Code" list

 

How can i proceed related lookup? Which formula should i use in "Plant Country" card which reflects to "Plant Code"

If you review and assist me i will be glad.

Thanks

 

2019-12-24 14_50_29-LCIP - Power Apps.png2019-12-24 14_53_08-EMEA Central Logistics - EMEA Plants - All Items.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @Ogun_ustun

 

Did you mean that  "Plant County" and "Plants Code" columns in this edit form are lookup columns? And their source list is EMEA Plants? 

 

If so, then please also add EMEA Plants list in the data source list of this app. Unlock the data card of  "Plants Code" lookup column, then set below formula in the Items property of the dropdown control:

Filter('EMEA Plants','Plant County'=DataCardValue5.Selected.Value).'Plant Code'

DataCardValue5 is the dropdown control's name in "Plant County" data card.

 

Then set the Update property of  "Plant Code" data card to:

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        Id:Lookup('EMEA Plants','Plant County'=DataCardValue5.Selected.Value,'Plant Code'=DataCardValue6.Selected.'Plant Code',ID),
                        Value:DataCardValue6.Selected.'Plant Code'}

 

Regards,

Mona

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

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Hi @Ogun_ustun

 

Did you mean that  "Plant County" and "Plants Code" columns in this edit form are lookup columns? And their source list is EMEA Plants? 

 

If so, then please also add EMEA Plants list in the data source list of this app. Unlock the data card of  "Plants Code" lookup column, then set below formula in the Items property of the dropdown control:

Filter('EMEA Plants','Plant County'=DataCardValue5.Selected.Value).'Plant Code'

DataCardValue5 is the dropdown control's name in "Plant County" data card.

 

Then set the Update property of  "Plant Code" data card to:

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        Id:Lookup('EMEA Plants','Plant County'=DataCardValue5.Selected.Value,'Plant Code'=DataCardValue6.Selected.'Plant Code',ID),
                        Value:DataCardValue6.Selected.'Plant Code'}

 

Regards,

Mona

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

View solution in original post

@v-monli-msftHello

 

"Plant County" and "Plants Code" columns were added by me in the SP list of power apps as drop down fields. They are not lookup columns.

As mentioned additionally i have EMEA plants list which has also "Plant County" and "Plants Code" columns.

 

My aim is make a lookup relationship between my app and EMEA plants list but no idea how to do it so since i am pretty new for power apps.

 

If you review i will be glad

 

2019-12-25 13_09_39-EMEA Central Logistics - LCIP Application - All Items.png2019-12-25 13_10_28-EMEA Central Logistics - EMEA Plants - All Items.png

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (6,688)