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 / Using distinct functio...
Power Apps
Answered

Using distinct function in combination with a Dropdown

(0) ShareShare
ReportReport
Posted on by 94

Hi all

 

If I have a SP-list with a single-line of text column, and in that list there are alot of itemst. Then by using Distinct(SP-List.SPColumn) i am able to make a "collection" of all distinct values form that column.

 

Now, I want those values to be displayed in a Dropdown control in my PowerApp, so I insert a Dropdown control and add the aboce Distinct function to the Item. So far, so god. I am able to see all of my distinct values in it.

 

But when I want to submit the seleced value to a Dropdown column in another SP-list it fails, or nothing happens, it leavs the field blank?

 

Is it possible to add distinct values from one list using a Dropdown control to another list?

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

    Are you submitting the distinct value to another SP list that has the same values in it (exactly)?

     

    Are you using a edit form for submitting:

        If so, set the default of that "other list item" to the value of your distinct dropdown list.

    or are you doing this through a Patch/Update statement?

        If so, you need to provide the proper SharePoint odata.type information

           MyChoiceColumn: {Value: YourDropDownList.Value, '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}

            

    In general, what you are doing is very possible.  Just need to make sure you are connecting the dots.

     

  • emoii Profile Picture
    94 on at

    Hi thanks for you reply

     

    I have user creation in one list, listA, and that user have af column called Department. I another list, listB I have all my departments as items, single line. 

     

    The experience for the one creating the user should be to click a drop down, be able to see all the departments from listB, and submit the propper department to a Column called userDepartment in listA.

     

    My idea was first to create the site column in listA as Drop Down and tried to connect the Distinct function to that columns control in PowerApps using the Item field. Then, on the Update field I had dropdown1.selected, and thought that this value then would be submitted to the listA sitecolumn userDepartment, but nope.

     

    I do a SubmitForm(form1, screentranstition.none) to submit to listA. I seems only to be able to chose .Results from the distinct list, and I do not know what to use that for.

  • Verified answer
    emoii Profile Picture
    94 on at

    Ended creating a lot of single line of text columns, and then I was able to parse the distinct value to those. Deleted the single line of text control in the card and added my own drop-down control, which i connected to the distinct column, and then updated the single line of text column in my list with the dropdown.selected.value.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    Very good!  But in the future, if you are working with Choice columns, keep the bit of information about submitting on hand - you will need it.

     

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