Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

How to remove the first and last character of a string of text inside of a collection

(0) ShareShare
ReportReport
Posted on by

 

Hello all,

 

I have the following code to create an "Info" collection with a column called "AttributesNew" :

 

jharville_0-1628642099259.png

 

The issue I'm having is under my "AttributesNew" column, the text it results in has a "," in the beginning and end of the string of text. Here's an example of an output it'd give:

 

,one,two,three,four,five,

 

I'd like to remove the first both the first and last comma of that string of text so that the output is this:

 

one,two,three,four,five

 

How would I modify my existing code to account for this functionality? I've messed around with using the Left() and Len() function but no luck as of yet.

 

Thank you!

  • jharville Profile Picture
    on at
    Re: How to remove the first and last character of a string of text inside of a collection

    Sometimes I look at code so long that I don't see the extreme obvious lol. Thank you for your help!

  • Verified answer
    BCLS776 Profile Picture
    8,988 Super User 2025 Season 1 on at
    Re: How to remove the first and last character of a string of text inside of a collection

    Your code looks like it is adding those commas for you - see circled expressions. Remove those and those extra commas should disappear:

    BCLS776_0-1628643889877.png

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard