cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ogun_ustun
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
v-monli-msft
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
v-monli-msft
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.

@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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,218)