cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Distinct in html with concat

Hi

 

I have a collection:

Name   Size   Color
Item1 S Green Item2 S Red Item3 M Green Item4 XL Blue Item5 L Yellow Item6 S Yellow

I gather this and other information in a html textbox to be send as an order.

 

I use Concat(SortByColumns(Order; "Color"); "Pls send sorted by color<br>" & Color & "<br>" & Name & "<br><br>")

 

Which gives me a nice list but I want it sorted like this (grouped by color):

 

Blue

item 4

 

Green

Item 1

Item 3

 

Red

Item 2

 

Yellow

Item5

Item 6

 

I also tried to add a new column, but the same issue occurs, I can't seem to find the right way to use distinct or find the alternative solution? Hope the case makes sense and someone knows the answer!

 

In advance - thank you 🙂 

Andreas

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Distinct in html with concat

Hi @Anonymous

 

The below method might be a long one and you might get some simpler solution , but this gets done what you asked for -

 

First, create a gallery with the Items property set to 

 

Distinct(Order,Color)

This will give you all the distinct colors and return it as a table with all the unique colors stored in a colum named Result.

 

Then Insert a html textbox in the gallery set to 

Concat(Filter(Order,Color=ThisItem.Result),Name,"<br>")

2018-02-03 20_01_18-Inbox - Vivek.Bavishi@regalbeloit.com - Outlook.png

 

Then insert another html textbox outside the gallery and set its value to 

Concat(Gallery4.AllItems,Title7&"<br>"&HtmlText3.HtmlText,"<br><br>")

 2018-02-03 20_01_41-.png

Let me know if you have any questions.


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Distinct in html with concat

Hi @Anonymous

 

The below method might be a long one and you might get some simpler solution , but this gets done what you asked for -

 

First, create a gallery with the Items property set to 

 

Distinct(Order,Color)

This will give you all the distinct colors and return it as a table with all the unique colors stored in a colum named Result.

 

Then Insert a html textbox in the gallery set to 

Concat(Filter(Order,Color=ThisItem.Result),Name,"<br>")

2018-02-03 20_01_18-Inbox - Vivek.Bavishi@regalbeloit.com - Outlook.png

 

Then insert another html textbox outside the gallery and set its value to 

Concat(Gallery4.AllItems,Title7&"<br>"&HtmlText3.HtmlText,"<br><br>")

 2018-02-03 20_01_41-.png

Let me know if you have any questions.


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Re: Distinct in html with concat

Super duper - wonderful 🙂

 

Used my old layout with all the extra elements and copied that to the gallery, and Voila! (or BUM! as I would say in Danish) I could add lines to make the section changes more easily read.

 

Maybe someone can do it easier as you suggest, but this seems adequate and flexible and not yet another nested function inside my crowded overall Concatenate where I display the order. So I love it this way 🙂 

 

Thanks a million

Andreas

Highlighted
Super User
Super User

Re: Distinct in html with concat

Great! Glad that it worked out.

 

Happy to help, always.. Smiley Happy


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

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 (9,317)