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

Issue saving distinct values from a choices function (SharePoint lookup)

My Dropdown column is connected to a sharepoint list and pulling in a lookup column using

Choices(List.Column)

I'm attempting to remove duplicates using

Distinct(Choices(List.Column), Value)

This successfully removes duplicates, however it doesn't save the selected value.

 

I'd appreciate any assistance or insight into the nature of the table returned by distrinct.

I'm also open to alternative approaches.

7 REPLIES 7
mr-dang
Level 10

Re: Issue saving distinct values from a choices function (SharePoint lookup)

*Removed*

Microsoft Employee
@8bitclassroom
Highlighted
M_Lat45
Level: Powered On

Re: Issue saving distinct values from a choices function (SharePoint lookup)

Hi Mr-Dang,

 

Thanks for the reply! Can you clarify how that might allow me to remove duplicates from a Dropdown control (connected to a lookup column)?

M_Lat45
Level: Powered On

Re: Issue saving distinct values from a choices function (SharePoint lookup)

Does anyone have any insight into what a lookup column expects? vs what the Distrinct formula returns?

mr-dang
Level 10

Re: Issue saving distinct values from a choices function (SharePoint lookup)

Ohhh, I see what happened. I had responded to the wrong thread 🙂 Sorry! I'll revise this after looking at it again.

Microsoft Employee
@8bitclassroom
mr-dang
Level 10

Re: Issue saving distinct values from a choices function (SharePoint lookup)


@M_Lat45 wrote:

My Dropdown column is connected to a sharepoint list and pulling in a lookup column using

Choices(List.Column)

I'm attempting to remove duplicates using

Distinct(Choices(List.Column), Value)

This successfully removes duplicates, however it doesn't save the selected value.

 

I'd appreciate any assistance or insight into the nature of the table returned by distrinct.

I'm also open to alternative approaches.


 

Hi @M_Lat45,

It sounds like you want to show the distinct choices for your column, but it jumps around.

 

I'm not sure why that's happening, but since your choices are probably static, you can put the choices into a collection:

 

ClearCollect(optionsForThisColumn, Distinct(Choices(List.Column), Value))

 

Then set the dropdown to the collection.

 

You can configure the Default property of the dropdown with a lookup so it will go to a certain option or just leave it alone.

 

Let me know if it helps this time 🙂 

 

Mr. Dang

Microsoft Employee
@8bitclassroom
Community Support Team
Community Support Team

Re: Issue saving distinct values from a choices function (SharePoint lookup)

Hi @M_Lat45,

 

Do you need any further help on this topic?

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vishalgoyal2472
Level: Powered On

Re: Issue saving distinct values from a choices function (SharePoint lookup)

@mr-dang 
Thanks for your reply but this is also not saving the data.

 

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,620)