Skip to main content
Community site session details

Community site session details

Session Id : J+qV+802AV7IUZDPvR7yrq
Power Apps - Building Power Apps
Answered

Split comma separated values and make them look like tags in a horizontal gallery

Like (0) ShareShare
ReportReport
Posted on 4 Nov 2023 20:23:06 by 47

Franklin_vaz_0-1699128661788.png

Hello beautiful minds!

  • I am developing Canvas with Dataverse for teams.
  • I have a table called "SQM Queries", in it there is a column called "Tags" which contains comma separated values as single line text.
  • I basically need something exactly like the above screenshot.
  • First connect my table to a vertical gallery control to list out all items in the table.
  • Inside the main vertical gallery, i need to have a nested gallery to display the comma separated valuesas Tags with grey background horiztaly just like the example above.
  • Note: Length of each separated values would be differing.

i have tried multiple options, couldn't crack it, can you help me please?

Categories:
  • Franklin_vaz Profile Picture
    47 on 05 Nov 2023 at 05:09:33
    Re: Split comma separated values and make them look like tags in a horizontal gallery

    Dear @LaurensM,

    • Thank you very much for helping me do this, I wasn't thinking about using HTML text property. It works as expected.
    • I would be incredible naive If i dont learn how to make them each executing a code. If i may ask, how would you approach this scenario if you were to make each button (tag) executable?

    Kind Regards,

    Frank

  • Verified answer
    LaurensM Profile Picture
    12,510 Moderator on 04 Nov 2023 at 21:03:44
    Re: Split comma separated values and make them look like tags in a horizontal gallery

    Hi @Franklin_vaz,

     

    In case these tags are only displayed for informational purposes and do not need to execute code when selected, the most flexible approach would be using the HTML text control and styling these tags via HTML and inline CSS. I have created a quick example of how you could go about styling the tags below:

     

    //HtmlText property
    $"<ul style = 'list-style-type: none; margin: 0; padding: 0;'>
     {Concat(Split(ThisItem.Tags, ","), "<li style = 'display: inline-block; background-color: rgba(218, 218, 218, 0.8); padding: 0px 5px 3px 5px; margin: 3px 3px; border-radius: 3px'>" & Value & "</li>")}
    </ul>"

     

    Additional info on the HTML text control can be found here

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Loading complete