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

Lookup items from one list based on column values in another list

My PowerApps form contains a field that is a lookup column in a SP list (Eq. Master), the SP column is named ID (this column contains a static list of bar-code values).  

 

Without getting into the details of my PowerApps form and associated SP lists, I need to get suggestions on how to go about solving an issue (it's really a feature, that I'd like to have).  My app's Form collects details about specific equipment ID's and inserts the form content into a "target" SP list.  The user selects the specific Eq ID using a drop-down box (this is from a different SP list, I'll call it the "source" list).  Depending on the situation, the user can use two dropdowns, each pulling items from the same SP list/column (both dropdowns pull from the "source" list, Eq ID field).

 

Here's what I'd like to do: as items are "inserted" into the "target" list , I'd like to "remove" these IDs from the dropdown items the user selects from (both dropdowns).  So, the net effect is that once an ID has been added to the target list (in either ID field), then it does not appear as available to the user to select a second-time.  See attached image, I don't want the target list to have duplicate items between the two ID fields.  As you can see in the image, both ID One and ID two columns have a value of C1002, this is what I want to avoid.

 

I'm pretty much a novice at PowerApps, so please consider that when making suggestions.  Your assistance is appreciated.

 

SteveG

3 REPLIES 3
Community Support Team
Community Support Team

Re: Lookup items from one list based on column values in another list

Hi @Sgriffin ,

 

I think this cannot be achieved using PowerApps, but you can make it work by setting from the SharePoint list side.

When creating the Lookup column "ID", please check the Enforce unique values to Yes. After this, this field would appear as a dropdown control inside the edit form and you will see the options from the source list. If user selects a value that has already in use, then he won't be able to save this item with the edit form.

Capture.JPG

 

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.
Sgriffin
Level: Powered On

Re: Lookup items from one list based on column values in another list

Thanks for your reply, but I don't that will work because the SP list has two ID columns (you'll see an example of this in the image I uploaded).  Is there a way to enforce uniqueness between these two columns?

 

Thanks again.

Community Support Team
Community Support Team

Re: Lookup items from one list based on column values in another list

Hi @Sgriffin ,

 

I'm afraid that this cannot be achieved. You cannot force unique between 2 columns.

 

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.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,138)