cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jharville
Helper V
Helper V

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

 

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!

1 ACCEPTED SOLUTION

Accepted Solutions
BCLS776
Super User
Super User

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

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
BCLS776
Super User
Super User

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

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

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

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,701)