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

Use Collect and Distinct in one function

Hi

I want to get a collection which is containing the input from an sql tabel, but as well distinct values of one single column from the same table. 
ClearCollect(StructureCollection;ShowColumns(Distinct('[dbo].[Structure]';"Entity_Key");"Entity_Key"));;
Collect(StructureCollection;'[dbo].[Structure]')

So the output should be the table and distinct values of one column, where all the other columns are empty. 

Can anyone come up with an idea of solving this problem? 


1 ACCEPTED SOLUTION

Accepted Solutions
PavanKumar
Level 8

Re: Use Collect and Distinct in one function

Hi,

 

yes you can do that as below

 

ClearCollect(colStructure,'[dbo].[Structure]');
ClearCollect(
colStructureFinal,
    AddColumns(
colStructure,
        "DistinctColumn",
       Concat(Distinct(colCaseList,'Entity_Key'),Result&" ,")
    )
);

If this answers your question mark it as verified and give a thumbs up

Regards,

Pavan Kumar Garlapati

1 REPLY 1
PavanKumar
Level 8

Re: Use Collect and Distinct in one function

Hi,

 

yes you can do that as below

 

ClearCollect(colStructure,'[dbo].[Structure]');
ClearCollect(
colStructureFinal,
    AddColumns(
colStructure,
        "DistinctColumn",
       Concat(Distinct(colCaseList,'Entity_Key'),Result&" ,")
    )
);

If this answers your question mark it as verified and give a thumbs up

Regards,

Pavan Kumar Garlapati

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 463 members 4,526 guests
Please welcome our newest community members: