web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SP List: Listing Uniqu...
Power Apps
Answered

SP List: Listing Unique Items from Lookup Column, Saving Them

(0) ShareShare
ReportReport
Posted on by 46

 

Hello!

 

I have two lists:

Main list: Dummy Enforcement Workflow

Lookup reference list: Contact List Conversion

 

In the lookup reference list, there is a column with employee names, all of which have duplicates. I do not want to see duplicate values in the items in the data card that references the Contact list, and I still want the SP list form to save the selected values. 

 

Thank you! That's the gist of the problem. Please read on if you would like more information.

 

When I simply use distinct(choices(['@Dummy Enforcement Workflow']),Values), it will display the unique items if I change the field properties to select the 'Results' output. However, the app will not save the selected items to the list.

I understand that the results are in text, and the list is expecting a record. I believe that is where my problems arise. I have tried using Patch in the On Select Property, to no avail.

 

When I use the below formulas, I get three rows added to the list when I select a contact. One of the three gives me what I would expect. However, I also get two other blank rows that I do not want.

Thomasjruss_0-1653677432024.png

 

 in the Items property

 

Thomasjruss_1-1653677432029.png

 

 in the On Select property

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Thomasjruss 

    Welcome to PowerApps hel1.  See numbers 1 and 2 in my post https://powerusers.microsoft.com/t5/Power-Apps-Community-Blog/The-Ten-Commandments-of-SharePoint-in-PowerApps/ba-p/848842 

    My suggestion would be to create a new list of your employee's names and reference it's ID in the workflow list. 

  • Thomasjruss Profile Picture
    46 on at

    Okay, thanks @Drrickryp. I'm learning. The contact list has duplicates because people can have multiple roles. So for instance, Marky Mark will have a row where they are listed as an investigator and a row where they are listed as an analyst. 

     

    I changed the data field that I want the name entered in to single text per the commandments. In the case of this app, I want the users to be able to see the options for names of people that are investigators, and to be able to select them and save them in the data field. Now I'm confused because I have a combobox control showing names filtered by investigator roles, but I still can't get the datacard to update with the selection. 

     

    I believe I'm having a hard time wrapping my head around commandment 2. There are ID values in the contact list.

     

    Any ideas?

     

    Thanks,

    Thomas

  • Verified answer
    Thomasjruss Profile Picture
    46 on at

    My solution follows:

     

    DataCardValue10 (Column Datacard) Items property = Distinct(Choices([@'Dummy Enforcement Workflow 2'].OData__x0045_OA2),Value)

     

    Column_DataCard Update property = 

    {
    Value: DataCardValue10.Selected.Result,
    Id:
    LookUp(
    'Contact List Conversion',
    Title = DataCardValue10.Selected.Result
    ).ID
    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard